From 399e33c5d78fbbdfd8d97b334535a828bc1d0bf5 Mon Sep 17 00:00:00 2001
From: khavinshankar ABDM Records Tab
+
Fetch Records over ABDM
+ ++ {dayjs(consent.created_date).fromNow()} +
++ expires in {dayjs(consent.expiry).fromNow()} +
++ {dayjs(consent.modified_date).fromNow()} +
++ created {dayjs(artefact.created_date).fromNow()} +
++ expires in {dayjs(artefact.expiry).fromNow()} +
+- {dayjs(consent.created_date).fromNow()} -
- {dayjs(consent.modified_date).fromNow()} -
+ created {dayjs(consent.created_date).fromNow()} +
++ modified {dayjs(consent.modified_date).fromNow()} +
+ Waiting for the Patient to approve the consent request +
+- Waiting for the Patient to approve the consent request + {consent.status === "REQUESTED" + ? "Waiting for the Patient to approve the consent request" + : "Patient has rejected the consent request"}
+ {head} + | + ))} ++ View + | +||||||
---|---|---|---|---|---|---|---|
+ {consent.patient_abha_object?.name}
+ + ({consent.patient_abha}) + + |
+
+ + {consent.status} + | + ++ {formatDateTime(consent.created_date)} + | + +
+ {`${consent.requester?.first_name} ${consent.requester?.last_name}`.trim()}
+ + ({consent.requester.username}) + + |
+
+
+ {formatDateTime(
+ consent.consent_artefacts?.[0]?.from_time ??
+ consent.from_time
+ )}{" "}
+ + {formatDateTime( + consent.consent_artefacts?.[0]?.to_time ?? + consent.to_time + )} + |
+
+ + {formatDateTime( + consent.consent_artefacts?.[0]?.expiry ?? + consent.expiry + )} + | + +
+
+ {(
+ consent.consent_artefacts?.[0]?.hi_types ??
+ consent.hi_types
+ )?.map((hiType) => (
+
+ {hiType}
+
+ ))}
+
+ |
+
+
+
+ {consent.consent_artefacts?.map((artefact, i) =>
+ artefact.status === "GRANTED" ? (
+
+ View Artefact {i + 1}
+
+ ) : (
+
+ + Artefact {i + 1} + + ) + )} + |
+
- Artefact {i + 1} -
- ) + {consent.status === "GRANTED" && + new Date( + consent.consent_artefacts?.[0]?.expiry ?? + consent.expiry + ) > new Date() ? ( + + View + + ) : ( ++ View +
)}({consent.requester.username})
-
-
-