Skip to content

Commit

Permalink
✨ feat(documents): Display all parsed reports nicely formatted.
Browse files Browse the repository at this point in the history
Not just the ones in the HealthOne format, also the ones in the Medidoc
format.
  • Loading branch information
make-github-pseudonymous-again committed Feb 17, 2025
1 parent e562cd7 commit 103a53d
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions imports/ui/documents/DocumentCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ const DocumentCardListItem = ({document}: DocumentCardListItemProps) => {

if (parsed) {
// eslint-disable-next-line default-case
switch (format) {
case 'healthone': {
switch (kind) {
case 'lab': {
// eslint-disable-next-line default-case
switch (kind) {
case 'lab': {
switch (format) {
case 'healthone': {
return (
<ListItem>
<ListItemAvatar>
Expand All @@ -206,26 +206,26 @@ const DocumentCardListItem = ({document}: DocumentCardListItemProps) => {
</ListItem>
);
}

case 'report': {
return (
<ListItem>
<ListItemAvatar>
<Avatar>
<SubjectIcon />
</Avatar>
</ListItemAvatar>
<ListItemText
disableTypography
primary={
<Typography variant="subtitle1">Contents</Typography>
}
secondary={<ReportContents document={document} />}
/>
</ListItem>
);
}
}

break;
}

case 'report': {
return (
<ListItem>
<ListItemAvatar>
<Avatar>
<SubjectIcon />
</Avatar>
</ListItemAvatar>
<ListItemText
disableTypography
primary={<Typography variant="subtitle1">Contents</Typography>}
secondary={<ReportContents document={document} />}
/>
</ListItem>
);
}
}
}
Expand Down

0 comments on commit 103a53d

Please sign in to comment.