Skip to content

Commit

Permalink
post-review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ojwanganto committed Jan 31, 2024
1 parent 109ba3e commit d01749a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/completed-list/completed-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ title {

.headerBtnContainer {
background-color: $ui-background;
// padding: spacing.$spacing-05;
padding: spacing.$spacing-05;
text-align: right;
}

Expand Down
2 changes: 1 addition & 1 deletion src/patient-chart/laboratory-order.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ const LaboratoryOrder: React.FC<LaboratoryOrderOverviewProps> = ({
),
},
location: {
content: <span>{entry.location.display}</span>,
content: <span>{entry?.location?.display}</span>,
},
status: {
content: <span>--</span>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const PrintResultsSummary: React.FC<PrintResultsSummaryProps> = ({
<span
style={{ fontSize: "10px", fontWeight: "bold", margin: "5px" }}
>
{encounterResponse.visit.location.display}
{encounterResponse?.visit?.location?.display}
</span>
</div>
<div
Expand Down
11 changes: 4 additions & 7 deletions src/results/result-form-field.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,22 @@ const ResultFormField: React.FC<ResultFormFieldProps> = ({
const isPanel = (concept) => concept.setMembers?.length > 0;

const printValueRange = (concept: ConceptReference) => {
let maxVal;
let minVal;
let rangeString = "";
if (concept?.datatype?.display === "Numeric") {
maxVal = Math.max(
const maxVal = Math.max(
concept?.hiAbsolute,
concept?.hiCritical,
concept?.hiNormal
);
minVal = Math.min(
const minVal = Math.min(
concept?.lowAbsolute,
concept?.lowCritical,
concept?.lowNormal
);
rangeString = ` (${minVal ?? 0} - ${maxVal ?? 0} ${
return ` (${minVal ?? 0} - ${maxVal > 0 ? maxVal : "--"} ${
concept?.units ?? ""
})`;
}
return rangeString;
return "";
};

return (
Expand Down
25 changes: 13 additions & 12 deletions src/results/result-form.resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ export interface ConceptResponse {
attributes: any[];
links: Link18[];
resourceVersion: string;
hiNormal: number;
hiAbsolute: number;
hiCritical: number;
lowNormal: number;
lowAbsolute: number;
lowCritical: number;
hiNormal?: number;
hiAbsolute?: number;
hiCritical?: number;
lowNormal?: number;
lowAbsolute?: number;
lowCritical?: number;
units?: string;
}

export interface Name {
Expand Down Expand Up @@ -165,12 +166,12 @@ export interface ConceptReference {
attributes: any[];
links: Link15[];
resourceVersion: string;
hiNormal: number;
hiAbsolute: number;
hiCritical: number;
lowNormal: number;
lowAbsolute: number;
lowCritical: number;
hiNormal?: number;
hiAbsolute?: number;
hiCritical?: number;
lowNormal?: number;
lowAbsolute?: number;
lowCritical?: number;
units?: string;
}

Expand Down
7 changes: 1 addition & 6 deletions src/work-list/work-list.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
import { Result, useGetOrdersWorklist } from "./work-list.resource";
import styles from "./work-list.scss";
import {
ConfigurableLink,
formatDate,
parseDate,
showModal,
Expand Down Expand Up @@ -149,17 +150,11 @@ const WorkList: React.FC<WorklistProps> = ({ fulfillerStatus }) => {
},
patient: {
content: (
<<<<<<< HEAD
<>
<span>{entry.patient.display.split("-")[1]}</span>
</>
=======
<ConfigurableLink
to={`\${openmrsSpaBase}/patient/${entry.patient.uuid}/chart/laboratory-orders`}
>
{entry.patient.display.split("-")[1]}
</ConfigurableLink>
>>>>>>> ccb70bf (add numeric value ranges for numeric tests)
),
},
orderNumber: { content: <span>{entry.orderNumber}</span> },
Expand Down

0 comments on commit d01749a

Please sign in to comment.