Skip to content

Commit

Permalink
Not show empty unit
Browse files Browse the repository at this point in the history
  • Loading branch information
ir4y committed Dec 13, 2024
1 parent f6ee2ac commit 1ad1f50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/containers/PatientDetails/PatientResources/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ export function getOptions(patient: WithId<Patient>): Option[] {
render: (resource: Observation) => {
if (resource.valueQuantity) {
const interpretation = getInterpretation(resource).join(', ');
return `${resource.valueQuantity.value} ${resource.valueQuantity.unit} ${interpretation}`;
return `${resource.valueQuantity.value} ${
resource.valueQuantity.unit ?? ''
} ${interpretation}`;
} else if (resource.component) {
return (
<>
Expand Down

0 comments on commit 1ad1f50

Please sign in to comment.