diff --git a/src/pages/appointments/[id].tsx b/src/pages/appointments/[id].tsx index f0da0d0..9543beb 100644 --- a/src/pages/appointments/[id].tsx +++ b/src/pages/appointments/[id].tsx @@ -51,7 +51,6 @@ const Patient: React.FC = () => { if (!extensions) return 'No details available'; for (let i = 0; i < extensions.length; i++) { const extension = extensions?.[i]; - // console.log(extension); if (extension.valueCodeableConcept?.coding) { for (let j = 0; j < extension.valueCodeableConcept.coding.length; j++) { const coding = extension.valueCodeableConcept?.coding?.[j]; @@ -81,6 +80,7 @@ if (!patient) { ); } + if(patient && appointments && encounters){ return ( @@ -112,7 +112,7 @@ if(patient && appointments && encounters){ @@ -137,7 +138,7 @@ if(patient && appointments && encounters){ diff --git a/src/pages/documents/[id].tsx b/src/pages/documents/[id].tsx index 941aa86..d9cc74d 100644 --- a/src/pages/documents/[id].tsx +++ b/src/pages/documents/[id].tsx @@ -104,8 +104,10 @@ const Documents: React.FC = () => { if(documents){ if(documents.entry){ - return ( -
+ if(documents.total){ + + return ( +
@@ -125,7 +127,7 @@ const Documents: React.FC = () => {

- {loading && + {(loading || !document) && currentDocumentID && !documentLoadError && } @@ -133,12 +135,18 @@ const Documents: React.FC = () => {