diff --git a/src/Data.js b/src/Data.js
index 8c2bf55..4be045e 100644
--- a/src/Data.js
+++ b/src/Data.js
@@ -92,13 +92,13 @@ export default function Data({ shx }) {
const bundle = shxResult.bundles[bundleIndex];
const organized = (bundle.contentOK() ? bundle.organized : undefined);
-
+
let elt = undefined;
if (organized) {
-
+
switch (organized.typeInfo.btype) {
-
+
case res.BTYPE_COVERAGE:
elt =
{JSON.stringify(bundle.fhir, null, 2)}
;
+ elt = {JSON.stringify(bundle.fhir, null, 2)}
;
break;
}
}
-
+
return(
<>
{ renderBundleChooser() }
@@ -147,12 +147,12 @@ export default function Data({ shx }) {
shxResult.bundles[bundleIndex].organized &&
shxResult.bundles[bundleIndex].organized.typeInfo &&
shxResult.bundles[bundleIndex].organized.typeInfo.label
-
+
? shxResult.bundles[bundleIndex].organized.typeInfo.label
: "Shared Information");
const div = document.getElementById("bundle-contents");
-
+
if (toFile) {
saveDivToPdfFile(div, baseName);
}
@@ -164,7 +164,7 @@ export default function Data({ shx }) {
const onBundleChange = (evt) => {
setBundleIndex(parseInt(evt.target.value));
}
-
+
const renderBundleChooser = () => {
if (shxResult.bundles.length <= 1) return(undefined);
@@ -185,18 +185,18 @@ export default function Data({ shx }) {
value={bundleIndex}
sx={{ mb: 2 }}
onChange={ onBundleChange } >
-
+
{ elts }
-
+
>
);
}
-
+
// +-------------+
// | Main Render |
// +-------------+
-
+
useEffect(() => {
verifySHX(shx, passcode)
@@ -231,4 +231,4 @@ export default function Data({ shx }) {
}
return(renderBundle());
-}
+}
\ No newline at end of file
diff --git a/src/PatientSummary.js b/src/PatientSummary.js
index 6ab02ba..dcc457d 100644
--- a/src/PatientSummary.js
+++ b/src/PatientSummary.js
@@ -1,14 +1,13 @@
-import * as futil from './lib/fhirUtil.js';
+import * as futil from './lib/fhirUtil.js';
import PatientSummarySection from './PatientSummarySection.js';
-
import styles from './PatientSummary.module.css';
+import IFrameSandbox from './IFrameSandbox.js';
+import DOMPurify from 'dompurify';
export default function PatientSummary({ organized, dcr }) {
-
// +----------------+
// | renderSections |
// +----------------+
-
const renderSections = () => {
return comp.section.flatMap((s) => {
return [
@@ -17,36 +16,47 @@ export default function PatientSummary({ organized, dcr }) {
,