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){
The patient has no appointments. The patient has no encounters.
+ {appointments?.total &&
}
+ {!appointments?.total &&
{appointments?.entry?.map((entry) => {
const resource = entry.resource as R4.IAppointment;
const display = getDisplayFromExtensions(resource.extension);
@@ -125,7 +125,8 @@ if(patient && appointments && encounters){
);
})}
-
+
+ {encounters?.total &&
}
+ {!encounters?.total &&
{encounters?.entry?.map((entry) => {
const resource = entry.resource as R4.IEncounter;
return (
@@ -150,7 +151,8 @@ if(patient && appointments && encounters){
)
})}
-
+
Please select a document
+ There is no documents here +
+@@ -155,16 +163,51 @@ const Documents: React.FC = () => {
+ There is no documents here +
++ Could not get any documents assosiated with the patient +
++ Could not find documents related to {patientId} +
+