From cc7fd2cd5801dd68afa8020999091d773b355ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kiil=20Olsen?= Date: Wed, 26 Jun 2024 09:00:58 +0200 Subject: [PATCH 1/4] Added so the document loads when it is not selected --- src/pages/documents/[id].tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/documents/[id].tsx b/src/pages/documents/[id].tsx index 941aa86..c12d121 100644 --- a/src/pages/documents/[id].tsx +++ b/src/pages/documents/[id].tsx @@ -125,7 +125,7 @@ const Documents: React.FC = () => {

- {loading && + {(loading || !document) && currentDocumentID && !documentLoadError && } @@ -155,6 +155,7 @@ const Documents: React.FC = () => { } + ) } From 4072b81164b83f0c011d80d040839bb05a1fbd23 Mon Sep 17 00:00:00 2001 From: Sofie Johansen Date: Wed, 26 Jun 2024 09:26:13 +0200 Subject: [PATCH 2/4] Fixed text for patients without encounters and appointments --- src/pages/appointments/[id].tsx | 12 ++++++++---- src/styles/appointment.module.scss | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/pages/appointments/[id].tsx b/src/pages/appointments/[id].tsx index f0da0d0..735cbd1 100644 --- a/src/pages/appointments/[id].tsx +++ b/src/pages/appointments/[id].tsx @@ -81,6 +81,8 @@ if (!patient) { ); } +// console.log(appointments?.total) + if(patient && appointments && encounters){ return ( @@ -112,7 +114,7 @@ if(patient && appointments && encounters){
    -
      + {appointments?.total &&
        {appointments?.entry?.map((entry) => { const resource = entry.resource as R4.IAppointment; const display = getDisplayFromExtensions(resource.extension); @@ -125,7 +127,8 @@ if(patient && appointments && encounters){ ); })} -
      +
    } + {!appointments?.total &&

    The patient has no appointments.

    }
@@ -137,7 +140,7 @@ if(patient && appointments && encounters){
    -
      + {encounters?.total &&
        {encounters?.entry?.map((entry) => { const resource = entry.resource as R4.IEncounter; return ( @@ -150,7 +153,8 @@ if(patient && appointments && encounters){ ) })} -
      +
    } + {!encounters?.total &&

    The patient has no encounters.

    }
diff --git a/src/styles/appointment.module.scss b/src/styles/appointment.module.scss index 830dbe4..7478497 100644 --- a/src/styles/appointment.module.scss +++ b/src/styles/appointment.module.scss @@ -8,7 +8,7 @@ .appointmentList, .encounterList { list-style-type: none; padding: 0; - height: calc(90vh - 100pt); + height: calc(80vh - 100pt); overflow-y: auto; } From 8ecad078d658596e562a83348d4c53c3066d8a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kiil=20Olsen?= Date: Wed, 26 Jun 2024 09:40:22 +0200 Subject: [PATCH 3/4] Smal fixes --- src/pages/appointments/[id].tsx | 1 - src/pages/documents/[id].tsx | 54 +++++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/pages/appointments/[id].tsx b/src/pages/appointments/[id].tsx index f0da0d0..45babbf 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]; diff --git a/src/pages/documents/[id].tsx b/src/pages/documents/[id].tsx index c12d121..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 ( +
@@ -133,12 +135,18 @@ const Documents: React.FC = () => {