diff --git a/src/lib/AddFile.svelte b/src/lib/AddFile.svelte deleted file mode 100644 index 63280572..00000000 --- a/src/lib/AddFile.svelte +++ /dev/null @@ -1,312 +0,0 @@ - - - { - currentTab = e.detail; -}}> - - FHIR URL - { handleSHCResultUpdate(detail) } } - on:ips-retrieved={ async ({ detail }) => { stageRetrievedIPS(detail) } }> - - - - File Upload - { handleSHCResultUpdate(detail) } } - on:ips-retrieved={ async ({ detail }) => { stageRetrievedIPS(detail) } }> - - - - SMART Patient Access - { preAuthRedirectHandler(detail) } } - on:updateResources={ async ({ detail }) => { handleNewResources(detail) } } - on:shc-retrieved={ async ({ detail }) => { handleSHCResultUpdate(detail) } }> - - - - -{#if resourcesToReview.length > 0} - {#if shlIdParam == null} -
- - - - - - -
- - showPassword = !showPassword}/> -
-
- - - - - - - - {/if} - {fetchError} - {#if resourcesToReview.length > 0} - {#if ipsResult.ips} - - - - - {#if submitting} - - - - {/if} - - - - - {ipsResult.source} - - - - - -
- {/if} - { uploadRetrievedIPS(detail) } }> - - {/if} -{/if} diff --git a/src/lib/FetchFile.svelte b/src/lib/FetchFile.svelte deleted file mode 100644 index 018f6025..00000000 --- a/src/lib/FetchFile.svelte +++ /dev/null @@ -1,86 +0,0 @@ - - -
retrieveIps()}> - - - - - - - - - - {#if processing} - - - - {/if} - -
- -{fetchError} - - \ No newline at end of file diff --git a/src/lib/FetchSoF.svelte b/src/lib/FetchSoF.svelte deleted file mode 100644 index 33dfb1e0..00000000 --- a/src/lib/FetchSoF.svelte +++ /dev/null @@ -1,100 +0,0 @@ - -
prepareIps()}> - - - {#each SOF_HOSTS as host} - -

{@html host.note}

- {/each} -
- - - - - - {#if processing} - - - - {/if} - -
-{fetchError} diff --git a/src/lib/FetchUrl.svelte b/src/lib/FetchUrl.svelte deleted file mode 100644 index c17cf1e7..00000000 --- a/src/lib/FetchUrl.svelte +++ /dev/null @@ -1,147 +0,0 @@ - - -
prepareIps()}> - - - (isOpen = !isOpen)}> - -
- - -
-
- - {#if Object.keys(PATIENT_IPS).length > 0} - Actual Patient Data (permitted for use) - {#each Object.entries(PATIENT_IPS) as [title, url]} - { - setSummaryUrlValidated(url); - }}>{title} - {url} - {/each} - - {/if} - {#if Object.keys(EXAMPLE_IPS).length > 0} - Test Patient Data - {#each Object.entries(EXAMPLE_IPS) as [title, url]} - { - setSummaryUrlValidated(url); - }}>{title} - {url} - {/each} - {/if} - -
-
- - - - - - {#if processing} - - - - {/if} - -
- -{fetchError} - \ No newline at end of file diff --git a/src/lib/HealthLink.svelte b/src/lib/HealthLink.svelte deleted file mode 100644 index d86b81d0..00000000 --- a/src/lib/HealthLink.svelte +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - {shl.label} - - - {#if shl.exp} - - Expires: {new Date(shl.exp * 1000).toISOString().slice(0, 10)} - - {/if} - - - {#await qrCode then dataUrl} - - {/await} - - - - {#if canShare} - - {/if} - - {#await href then href} - - {/await} - - - - - - - - - - - -
- - showPassword = !showPassword}/> -
- -
- - - - Delete SMART Health Link - - "{shl.label}" will be permanently deleted. Continue? - - - - - - - - -
- -

SHL Content

-
-{#if shl.files.length == 0} - -

No records found

-
-{/if} -{#each shl.files as file (file.contentEncrypted)} - - - - - - IPS - {#if file.date} - {file.date} - {/if} - - - - {#if file.contentType} - - {file.contentType} - - {/if} - - - - - - - -{/each} - - - - - - - diff --git a/src/lib/HealthLinkOverview.svelte b/src/lib/HealthLinkOverview.svelte deleted file mode 100644 index f92a0b93..00000000 --- a/src/lib/HealthLinkOverview.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - -

Create a new shareable health summary

- - - - - - - -
-{#if $shlStore.length > 0} - - -

Summaries created and stored on this device

- -
-{#each $shlStore as shl, i} - - {shl.label || `SHLink ${i + 1}`} - - -{/each} - - -
-{/if} -
- diff --git a/src/lib/HealthLinkOverviewItem.svelte b/src/lib/HealthLinkOverviewItem.svelte deleted file mode 100644 index e69de29b..00000000 diff --git a/src/lib/ResourceSelector.svelte b/src/lib/ResourceSelector.svelte deleted file mode 100644 index 256fee02..00000000 --- a/src/lib/ResourceSelector.svelte +++ /dev/null @@ -1,207 +0,0 @@ - - -
confirm()}> - - - {#if resources != null} -

Select resources from the list below to include in a new customized Summary:

- {#each Object.keys(resources) as key} -
- - -
- {/each} - {/if} -
-
-
- - - - - {#if submitting} - - - - {/if} - -
-
diff --git a/src/lib/ResourceSelectorLTT.svelte b/src/lib/ResourceSelectorLTT.svelte deleted file mode 100644 index ec1d374c..00000000 --- a/src/lib/ResourceSelectorLTT.svelte +++ /dev/null @@ -1,221 +0,0 @@ - - -
confirm()}> - - - -

Select resources from the list below to include in a new customized Summary:

- {#each Object.keys(patients) as key} -
- - -
- {/each} - {#each Object.keys(resources) as key} -
- - -
- {/each} - -
-
-
- - - - - {#if submitting} - - - - {/if} - -
-
diff --git a/src/lib/config.tsold.default b/src/lib/config.tsold.default deleted file mode 100644 index 57b7ebcb..00000000 --- a/src/lib/config.tsold.default +++ /dev/null @@ -1,47 +0,0 @@ -import { dev } from '$app/environment'; - -export const API_BASE = 'https://smart-health-links-server.cirg.washington.edu/api' - -export const INTERMEDIATE_FHIR_SERVER_BASE = 'https://fhir.ips-demo.dev.cirg.uw.edu/fhir'; - -export const RESOURCES_TO_LOAD_KEY = 'RESOURCES_TO_LOAD'; -export const PATIENT_REFERENCE_KEY = 'PATIENT_REFERENCE_TO_LOAD'; -export const IPS_URL_KEY = 'IPS_URL'; - -export const EPIC_CLIENT_ID = ''; -export const CERNER_CLIENT_ID = ''; -export const SOF_REDIRECT_URI = '/create/confirm'; -export const SOF_RESOURCES = [ - 'Patient', - 'AllergyIntolerance', - // 'MedicationStatement', // Not in EPIC USCDI R4 - 'MedicationRequest', - // 'Medication', // can't search by patient; "Only an _ID search is allowed." - 'Condition', - 'Observation', // "Must have either code or category." - // 'Organization', // can't search by patient; "Only an _ID search is allowed." - 'Immunization', - // 'Device', - // 'DeviceUseStatement', // Not in EPIC USCDI R4 - 'DiagnosticReport', // TODO change to subject - // 'ImagingStudy', // Not in EPIC USCDI R4 - // 'Media', // Not in EPIC USCDI R4 - // 'Practitioner', // can't search by patient; "Either name, family, or identifier is a required parameter." - // 'PractitionerRole', // can't search by patient; "An identifier, practitioner, organization, location, or specialty parameter is required." - 'Procedure', // TODO change to subject - // 'Specimen', // Not in EPIC USCDI R4 -]; - -export const VIEWER_BASE = new URL( - `/ips${dev ? '/index.html' : ''}#`, - window.location.href -).toString(); -export const EXAMPLE_IPS = { - 'Maria SEATTLE Gravitate': 'https://fhir.ips-demo.dev.cirg.uw.edu/fhir/Patient/14599/$summary', - 'Peter Keith Jones': 'https://fhir.ips-demo.dev.cirg.uw.edu/fhir/Patient/11013/$summary', - 'Angela Roster': 'https://fhir.ips-demo.dev.cirg.uw.edu/fhir/Patient/10965/$summary', - 'Horace Skelly': 'https://fhir.ips-demo.dev.cirg.uw.edu/fhir/Patient/11142/$summary', - 'Anonymous': 'https://fhir.ips-demo.dev.cirg.uw.edu/fhir/Patient/10999/$summary' -}; -export const EXAMPLE_IPS_DEFAULT = 'Maria SEATTLE Gravitate'; - // 'https://ips.health/fhir/Patient/98549f1a-e0d5-4454-849c-f5b97d3ed299/$summary'; diff --git a/src/lib/resourceUploader.js b/src/lib/resourceUploader.js deleted file mode 100644 index 1914d457..00000000 --- a/src/lib/resourceUploader.js +++ /dev/null @@ -1,112 +0,0 @@ -import { INTERMEDIATE_FHIR_SERVER_BASE } from './config'; - -// This is both allowable and reverse order of loading -const allowableResourceTypes = [ - //'Patient', this is loaded separately - 'Organization', - 'Practitioner', - 'Device', - 'Medication', - 'PractitionerRole', - 'Encounter', - 'DeviceUseStatement', - 'Media', - 'Specimen', - 'AllergyIntolerance', - // 'CarePlan', Still needs some work for referential integrity - 'ClinicalImpression', - 'Consent', - 'Condition', - 'Immunization', - // 'Procedure', Removed until hapi server thymeleaf fixes are available - 'Observation', - 'DiagnosticReport', - 'MedicationRequest', - 'MedicationStatement' -]; - -export function getResourcesFromIPS(ips) { - let entries = ips.entry; - let resources = []; - entries.forEach((entry) => { - if (entry.resource.resourceType == 'Condition') return; // Omit conditions until ips fhir server is upgraded - if (entry.resource.resourceType == 'Composition') return; - - entry.resource.id = entry.fullUrl; - if (entry.resource.extension) { - entry.resource.extension = entry.resource.extension.filter(function(item) { - return item.url !== "http://hl7.org/fhir/StructureDefinition/narrativeLink"; - }) - } - resources.push(entry.resource); - }); - return resources; -} - -// Create Bundle and POST -export async function uploadResources(resources) { - let entries = []; - resources.forEach(resource => { - let entry = { - request: { - method: "POST", - url: resource.resourceType - }, - resource: resource - }; - entries.push(entry); - }); - let bundle = { - resourceType: "Bundle", - type: "transaction", - entry: entries - }; - - return await fetch(`${INTERMEDIATE_FHIR_SERVER_BASE}`, { - method: 'POST', - headers: { - 'Content-Type': 'application/json+fhir', - // Add any additional headers if needed - }, - body: JSON.stringify(bundle), - }).then((response) => { - return response.json() - }).then((body) => { - let ipsUrl = ""; - body.entry.forEach(entry => { - if (entry.response.location.startsWith('Patient')) { - let createdPatient = entry.response.location.split('/_history')[0]; - ipsUrl = `${INTERMEDIATE_FHIR_SERVER_BASE}/${createdPatient}/$summary`; - } - console.log(entry.response.outcome.issue[0].diagnostics); - }); - return ipsUrl; - }); -} - -export function checkResource(data) { - if (data.resourceType && allowableResourceTypes.includes(data.resourceType)) { - return data; - } else if (data.resourceType === 'Patient') { - return data; - } else if (data.resourceType && data.resourceType === 'Bundle') { - if (data.entry) { - for (let i = 0; i < data.entry.length; i++) { - if (data.entry[i].resource && data.entry[i].resource.resourceType && allowableResourceTypes.includes(data.entry[i].resource.resourceType)) { - if (data.entry[i].fullUrl) { - data.entry[i].resource.fullUrl = data.entry[i].fullUrl; - } - return data.entry[i].resource; - } else if (data.entry[i].resource && data.entry[i].resource.resourceType && data.entry[i].resource.resourceType === 'Patient') { - return data.entry[i].resource; - } else { - console.log(`skipping ${data.entry[i].resource.resourceType}`); - return null; - } - } - } - } else { - console.log(`skipping ${data.resourceType}`); - return null; - } -} diff --git a/src/lib/resourceUploaderTSWrapper.ts b/src/lib/resourceUploaderTSWrapper.ts deleted file mode 100644 index c10ec7e3..00000000 --- a/src/lib/resourceUploaderTSWrapper.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { - checkResource as checkResourceJS, - uploadResources as uploadResourcesJS, - getResourcesFromIPS as getResourcesFromIPSJS -} from './resourceUploader.js'; - -export function checkResource(resource:any) { - return checkResourceJS(resource); -} - -export async function uploadResources(resources:any[]) { - return await uploadResourcesJS(resources); -} - -export function getResourcesFromIPS(ips: any) { - return getResourcesFromIPSJS(ips); -} diff --git a/src/routes/create/+page.svelte b/src/routes/create/+page.svelte deleted file mode 100644 index 45d4e35b..00000000 --- a/src/routes/create/+page.svelte +++ /dev/null @@ -1,57 +0,0 @@ - - -{#if shl} -

Add Record to "{shl.label}"

-{/if} - - { - if (shl) { - shl = await addFiles(shl, detail.shcs); - $shlStore[$shlStore.findIndex(obj => obj.id === shl?.id)] = shl; - goto(`/view/${shl.id}`); - } else { - const newShl = await newShlFromShc(detail); - $shlStore = [...$shlStore, newShl]; - goto(`/view/${newShl.id}`); - } - }} -/> diff --git a/src/routes/home/+page.svelte b/src/routes/home/+page.svelte deleted file mode 100644 index 70372b91..00000000 --- a/src/routes/home/+page.svelte +++ /dev/null @@ -1,37 +0,0 @@ - - -
- -

Demonstration/Test System - do not enter protected health information

- -

WA Verify+ lets people obtain and personally control the sharing of their health information.

- -

Using the SMART Health Links and International Patient Summary standards, combined with the right of all people in the U.S. to obtain an online computer-readable copy of their health records under the U.S. government’s 21st Century Cures Act, the WA Verify+ system builds on the ideas and technologies in the WA Verify COVID-19 vaccination verification system which was used by almost two million people from 2021-2023.

-
- - - - - -

About WA Verify+

- -

Since 2021, WA Verify has made it easy for people receiving COVID-19 vaccinations in Washington State to access and share that information using SMART Health Card QR codes.

- -

Now, using SMART Health Links, WA Verify+ is exploring personally-controlled access to and sharing of health data by WA State residents to meet needs such as travel, emergency records access, school enrollment, etc.

- -

WA Verify+ allows people to access, augment, and electively share their own health data using the International Patient Summary (IPS) standard. They might choose to do so to verify immunizations, to summarize traveler health information, to have a medical summary in the event they require urgent or emergency care, or for routine sharing of their full history with others.

- -

IPS information includes important clinical history, medications, immunizations, advance directives, and other data vital for health care. This data may be helpful to those traveling, to parents or caregivers, and to anyone who wants to be able to see their own records, or securely share their data with healthcare providers or others of their choosing. WA Verify+ uses the secure, patient-controlled SMART Health Link (SHL) standard to allow people to share information collected and stored on their behalf by the Washington State Department of Health.

- -

This system generates QR codes and links that demonstrate the ability of WA Verify+ to facilitate personally-controlled sharing of health records. On this page, you can view listed SHLs previously generated on this device, and you can generate a new SHL.

- -
-
\ No newline at end of file diff --git a/src/routes/view/[id]/+page.svelte b/src/routes/view/[id]/+page.svelte deleted file mode 100644 index 6e5be12e..00000000 --- a/src/routes/view/[id]/+page.svelte +++ /dev/null @@ -1,18 +0,0 @@ - - -{#if shl} - -{:else} - SHLink {$page.params.id} Not Found -{/if}