diff --git a/src/lib/FetchSoF.svelte b/src/lib/FetchSoF.svelte index 9ae34094..8688a73d 100644 --- a/src/lib/FetchSoF.svelte +++ b/src/lib/FetchSoF.svelte @@ -153,6 +153,7 @@ + + + + + + +
4. Directly edit your health summary content
@@ -212,14 +269,29 @@ {#each Object.keys($resourcesByTypeStore[resourceType]) as key} - + + {/each}
@@ -250,3 +322,19 @@ {/if} + \ No newline at end of file diff --git a/src/lib/util.ts b/src/lib/util.ts index 73a8e1e3..85f4d027 100644 --- a/src/lib/util.ts +++ b/src/lib/util.ts @@ -17,6 +17,19 @@ export async function base64toBlob(base64:string, type="application/octet-stream return window.URL.createObjectURL(await result.blob()); } +export function download(filename:string, text:string) { + var element = document.createElement('a'); + element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); + element.setAttribute('download', filename); + + element.style.display = 'none'; + document.body.appendChild(element); + + element.click(); + + document.body.removeChild(element); +} + export function getResourcesFromIPS(ips: Bundle) { let entries = ips.entry; let resources = [] as Resource[]; diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7036eca2..7a1afbd3 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -105,7 +105,7 @@ Actions - + { closeNav(); @@ -122,9 +122,11 @@ on:click={() => { $mode = ($mode === 'advanced' ? 'normal' : 'advanced'); }}> - - {$mode === "advanced" ? "Hide" : "Show"} Advanced Features - + + + {$mode === "advanced" ? "Hide" : "Show"} Advanced Features + + {#if $mode == 'advanced'} {:else} @@ -151,7 +153,7 @@ {locale} - + {#each Object.entries(locales) as [en, loc]} International Patient Summary - document. SHLinks can be shared by copy/paste, or by presenting a QR code. Source code and license at - https://github.com/uwcirg/shl-ips. Site version: {VERSION_STRING} + document. SHLinks can be shared by copy/paste, or by presenting a QR code. + {#if $mode === "advanced"} + For more information, view the source code and license at + https://github.com/uwcirg/shl-ips. {VERSION_STRING ? "Site version: " + VERSION_STRING : ""} + {/if}