├── .npmrc ├── src ├── routes │ ├── +layout.ts │ ├── +layout.svelte │ └── +page.svelte ├── lib │ ├── config.ts │ ├── app.d.ts │ ├── utils │ │ ├── types.ts │ │ ├── util.ts │ │ └── shlClient.ts │ └── components │ │ ├── resource-templates │ │ ├── Organization.svelte │ │ ├── Consent.svelte │ │ ├── Immunization.svelte │ │ ├── Encounter.svelte │ │ ├── Location.svelte │ │ ├── Dosage.svelte │ │ ├── Procedure.svelte │ │ ├── AllergyIntolerance.svelte │ │ ├── Practitioner.svelte │ │ ├── Medication.svelte │ │ ├── Condition.svelte │ │ ├── Goal.svelte │ │ ├── MedicationStatement.svelte │ │ ├── MedicationRequest.svelte │ │ ├── DiagnosticReport.svelte │ │ ├── Observation.svelte │ │ ├── OccupationalData.svelte │ │ ├── Patient.svelte │ │ └── AdvanceDirective.svelte │ │ └── viewer │ │ ├── Demo.svelte │ │ └── IPSContent.svelte ├── env.d.ts └── app.html ├── classic ├── favicon.ico ├── templates │ ├── Text.html │ ├── Composition.html │ ├── Patient.html │ ├── Immunizations.html │ ├── Allergies.html │ ├── Problems.html │ ├── Checks.html │ ├── AdvanceDirectives.html │ ├── Observations.html │ └── Medications.html ├── assets │ ├── css │ │ └── custom.css │ ├── html │ │ ├── footer.html │ │ └── header.html │ └── js │ │ └── test.js └── ips_main.html ├── static ├── favicon.ico ├── favicon.png ├── img │ ├── menu.png │ └── ips-logo.png └── color guide.html ├── fix-popper.sh ├── default.env.development ├── .prettierignore ├── .env ├── default.env ├── .prettierrc ├── karma.conf.js ├── test └── test.js ├── vite.config.ts ├── .gitignore ├── tsconfig.json ├── svelte.config.js ├── package.json ├── app.js ├── README.md ├── LICENSE └── samples ├── connectathon_archive ├── TW_Li-Hui_Lee_01-modified.json └── HK_IPS_Sample1.json └── connectathon_samples ├── TW_Li-Hui_Lee_01-modified.json └── HK_IPS_Sample1.json /.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /src/routes/+layout.ts: -------------------------------------------------------------------------------- 1 | export const prerender = false; 2 | export const ssr = false; 3 | -------------------------------------------------------------------------------- /classic/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jddamore/IPSviewer/HEAD/classic/favicon.ico -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jddamore/IPSviewer/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jddamore/IPSviewer/HEAD/static/favicon.png -------------------------------------------------------------------------------- /static/img/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jddamore/IPSviewer/HEAD/static/img/menu.png -------------------------------------------------------------------------------- /static/img/ips-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jddamore/IPSviewer/HEAD/static/img/ips-logo.png -------------------------------------------------------------------------------- /fix-popper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sed -i '/2\.11\.6/a \ \ "type": "module",' node_modules/@popperjs/core/package.json 3 | -------------------------------------------------------------------------------- /default.env.development: -------------------------------------------------------------------------------- 1 | # If overrides to .env values are needed for development 2 | 3 | # vite dev server port 4 | # DEV_SERVER_PORT= 5 | -------------------------------------------------------------------------------- /src/lib/config.ts: -------------------------------------------------------------------------------- 1 | // import {PUBLIC_BASE_URL} from '$env/static/public'; 2 | export const SHOW_VIEWER_DEMO = import.meta.env.VITE_SHOW_VIEWER_DEMO; 3 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | 10 | # Ignore files for PNPM, NPM and YARN 11 | pnpm-lock.yaml 12 | package-lock.json 13 | yarn.lock 14 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # Default environment file; copy to .env and modify as necessary 2 | 3 | # Debug option for non-prod deployments using /build output 4 | # (Works best in Chrome) 5 | # DEBUG=1 6 | 7 | # Adds demo tab to IPS viewer 8 | VITE_SHOW_VIEWER_DEMO=1 9 | -------------------------------------------------------------------------------- /default.env: -------------------------------------------------------------------------------- 1 | # Default environment file; copy to .env and modify as necessary 2 | 3 | # Debug option for non-prod deployments using /build output 4 | # (Works best in Chrome) 5 | # DEBUG=1 6 | 7 | # Adds demo tab to IPS viewer 8 | VITE_SHOW_VIEWER_DEMO=1 9 | -------------------------------------------------------------------------------- /src/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface ImportMetaEnv { 4 | readonly VITE_SHOW_VIEWER_DEMO: boolean 5 | readonly DEV_SERVER_PORT: number 6 | } 7 | 8 | interface ImportMeta { 9 | readonly env: ImportMetaEnv 10 | } -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": false, 3 | "singleQuote": true, 4 | "trailingComma": "none", 5 | "printWidth": 100, 6 | "plugins": ["prettier-plugin-svelte"], 7 | "pluginSearchDirs": ["."], 8 | "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] 9 | } 10 | -------------------------------------------------------------------------------- /src/lib/app.d.ts: -------------------------------------------------------------------------------- 1 | // See https://kit.svelte.dev/docs/types#app 2 | // for information about these interfaces 3 | declare global { 4 | namespace App { 5 | // interface Error {} 6 | // interface Locals {} 7 | // interface PageData {} 8 | // interface Platform {} 9 | } 10 | } 11 | 12 | export {}; 13 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | module.exports = function(config) { 2 | config.set({ 3 | frameworks: ['mocha', 'chai'], 4 | files: ['test/**/*.js'], 5 | reporters: ['progress'], 6 | port: 9876, // karma web server port 7 | colors: true, 8 | logLevel: config.LOG_INFO, 9 | browsers: ['ChromeHeadless'], 10 | autoWatch: false, 11 | // singleRun: false, // Karma captures browsers, runs the tests and exits 12 | concurrency: Infinity 13 | }) 14 | } -------------------------------------------------------------------------------- /classic/templates/Text.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | {{titulo}} 7 |
8 |
9 | {{div}} 10 |
11 |
-------------------------------------------------------------------------------- /classic/templates/Composition.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Document (Composition) 7 |
8 |
9 |
{{title}}
10 |

11 | Summary Date: {{date}} 12 |
13 |

14 |
15 |
-------------------------------------------------------------------------------- /classic/assets/css/custom.css: -------------------------------------------------------------------------------- 1 | .card { 2 | margin-bottom: 15px; 3 | } 4 | 5 | .icon-action { 6 | margin-top: 5px; 7 | float: right; 8 | font-size: 80%; 9 | } 10 | 11 | .list-group-item .title { 12 | margin-top: 5px; 13 | margin-bottom: 12px; 14 | font-weight: 600; 15 | } 16 | 17 | .textBody table { 18 | table-layout: fixed; 19 | width: 100%; 20 | 21 | } 22 | 23 | .buttonSpacer { 24 | padding-left: 20px; 25 | padding-top: 20px; 26 | } 27 | 28 | .tdLeft { 29 | text-align: left; 30 | } 31 | 32 | .tdCenter { 33 | text-align: center; 34 | } 35 | 36 | .message { 37 | color: red; 38 | font-size: 1.0rem; 39 | } -------------------------------------------------------------------------------- /classic/templates/Patient.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Patient 7 |
8 |
9 |
10 |

11 | Birth Date: {{birthDate}} 12 |
13 | Name: {{name[0].given}}, {{name[0].family}} 14 |

15 |
16 |
-------------------------------------------------------------------------------- /classic/assets/html/footer.html: -------------------------------------------------------------------------------- 1 |
2 | Originally created by Alejandro Lopez Osornio, Diego Kaminker and Fernando Campos. Modified 2021-2023 by John 3 | D'Amore 4 |
5 | Based on prior work from this repository 7 |
8 | Licensed according to Apache 2.0. See current code 9 | repository for details 10 |
11 | Hosted by Progress for Informatics and Energy Foundation, Inc. 12 | -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | const chai = require('chai') 2 | const assert = chai.assert; 3 | const expect = chai.expect; 4 | const request = require('request'); 5 | 6 | describe('Localhost', () => { 7 | it('should return statusCode of 200 when online', (done) => { 8 | request.get( 9 | { 10 | url: "http://localhost" 11 | }, 12 | function (error, response, body) { 13 | var _body = {}; 14 | try { 15 | _body = JSON.parse(body); 16 | } 17 | catch (e) { 18 | _body = {}; 19 | } 20 | expect(response.statusCode).to.equal(200); 21 | done(); 22 | } 23 | ); 24 | }); 25 | }) 26 | 27 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig, loadEnv } from 'vite'; 3 | 4 | export default defineConfig(({ mode }) => { 5 | // Load env file based on `mode` in the current working directory. 6 | // Set the third parameter to '' to load all env regardless of the `VITE_` prefix. 7 | // const env = {...process.env, ...loadEnv(mode, process.cwd(), '')}; 8 | process.env = {...process.env, ...loadEnv(mode, process.cwd(), '')}; 9 | return { 10 | // vite config 11 | plugins: [sveltekit()], 12 | server: { 13 | host: true, 14 | port: process.env.DEV_SERVER_PORT ? process.env.DEV_SERVER_PORT : 3000 15 | }, 16 | build: { 17 | sourcemap: process.env.DEBUG ?? false 18 | } 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Dependency directories 9 | node_modules/ 10 | jspm_packages/ 11 | repos/ 12 | certs/ 13 | 14 | # Optional npm cache directory 15 | .npm 16 | 17 | # Optional eslint cache 18 | .eslintcache 19 | 20 | # Optional REPL history 21 | .node_repl_history 22 | 23 | # Output of 'npm pack' 24 | *.tgz 25 | 26 | # Yarn Integrity file 27 | .yarn-integrity 28 | 29 | # Ignore Mac DS_Store files 30 | .DS_Store 31 | 32 | # Vite outputs 33 | /build 34 | # Temp files 35 | vite.config.js.timestamp-* 36 | vite.config.ts.timestamp-* 37 | 38 | # Sveltekit 39 | /.svelte-kit 40 | 41 | # Envs - JUST GOING TO ALLOW SINCE WE NEED AND I FORGET ALL TIME 42 | #.env 43 | #.env.* 44 | 45 | # VS Code session 46 | /.vscode 47 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./.svelte-kit/tsconfig.json", 3 | "compilerOptions": { 4 | "allowJs": true, 5 | "checkJs": false, 6 | "esModuleInterop": true, 7 | "resolveJsonModule": true, 8 | "skipLibCheck": true, 9 | "moduleDetection": "force", 10 | "isolatedModules": true, 11 | "forceConsistentCasingInFileNames": true, 12 | "strict": true, 13 | "moduleResolution": "node", 14 | "module": "ESNext", 15 | "noEmit": true, 16 | "lib": ["es2022"], 17 | "sourceMap": true, 18 | "suppressImplicitAnyIndexErrors": true, 19 | "ignoreDeprecations": "5.0", 20 | } 21 | // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias 22 | // 23 | // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes 24 | // from the referenced tsconfig.json - TypeScript does not merge them in 25 | } 26 | -------------------------------------------------------------------------------- /svelte.config.js: -------------------------------------------------------------------------------- 1 | import { vitePreprocess } from '@sveltejs/kit/vite'; 2 | import adapter from '@sveltejs/adapter-static'; 3 | 4 | const dev = process.argv.includes('dev'); 5 | 6 | /** @type {import('@sveltejs/kit').Config} */ 7 | export default { 8 | preprocess: vitePreprocess(), 9 | kit: { 10 | adapter: adapter({ 11 | // default options are shown. On some platforms 12 | // these options are set automatically — see below 13 | pages: 'build', 14 | assets: 'build', 15 | fallback: "404.html", 16 | precompress: false, 17 | strict: true, 18 | paths: { 19 | base: dev ? '' : '/shlips' 20 | } 21 | }), 22 | csp: { 23 | directives: { 24 | 'script-src': ['self'] 25 | }, 26 | reportOnly: { 27 | 'script-src': ['self'], 28 | 'report-uri': ['/'] 29 | } 30 | } 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /static/color guide.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | orange: rgb(200, 76, 14)

7 | blue: rgb(34, 72, 156)

8 | error red: rgb(179, 0, 0);

9 | Note: 10 |


11 | Button Style 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | IPS Viewer 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | %sveltekit.head% 14 | 15 | 16 |
%sveltekit.body%
17 | 18 | 19 | -------------------------------------------------------------------------------- /src/lib/utils/types.ts: -------------------------------------------------------------------------------- 1 | import type { BundleEntry, DocumentReference } from 'fhir/r4'; 2 | 3 | export interface SHCFile { 4 | verifiableCredential: string[]; 5 | } 6 | 7 | export interface ResourceTemplateParams { 8 | resource: T; 9 | entries?: BundleEntry[]; 10 | } 11 | 12 | export interface DocumentReferencePOLST extends DocumentReference { 13 | pdfSignedDate?: string; 14 | 15 | isPolst?: boolean; 16 | 17 | isCpr?: boolean; 18 | doNotPerformCpr?: boolean; 19 | 20 | isComfortTreatments?: boolean; 21 | doNotPerformComfortTreatments?: boolean; 22 | typeComfortTreatments?: string; 23 | detailComfortTreatments?: string; 24 | 25 | isAdditionalTx?: boolean; 26 | doNotPerformAdditionalTx?: boolean; 27 | detailAdditionalTx?: string; 28 | 29 | isMedicallyAssisted?: boolean; 30 | doNotPerformMedicallyAssisted?: boolean; 31 | detailMedicallyAssisted?: string; 32 | } 33 | 34 | export type DocumentReferenceAD = DocumentReferencePOLST | DocumentReference; 35 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Organization.svelte: -------------------------------------------------------------------------------- 1 | 8 | 9 | {resource.name} 10 |
11 | {#if resource.address} 12 | {#if resource.address[0].line} 13 | {#if resource.address[0].line.length > 0} 14 | {#each resource.address[0].line as line} 15 | {line}
16 | {/each} 17 | {:else} 18 | {resource.address[0].line} 19 | {/if} 20 | {/if} 21 | {resource.address[0].city 22 | }{resource.address[0].state 23 | ? `, ${resource.address[0].state}` 24 | : '' 25 | }{resource.address[0].country 26 | ? `, ${resource.address[0].country}` 27 | : ''} 28 | {resource.address[0].postalCode} 29 | {/if} 30 | -------------------------------------------------------------------------------- /classic/templates/Immunizations.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Immunizations 7 |
8 |
9 |
    10 | {{each(options.immunizations)}} 11 |
  • 12 | {{@this.occurrenceDateTime}}
    13 | 14 | {{if(@this.vaccineCode.coding[0].display)}} 15 | {{@this.vaccineCode.coding[0].display}} 16 | {{#else}} 17 | {{@this.vaccineCode.text}} np 18 | {{/if}} 19 | 20 | {{@this.vaccineCode.coding[0].system}} 21 | {{@this.vaccineCode.coding[0].code}}
    22 |
  • 23 | {{/each}} 24 |
25 |
26 |
-------------------------------------------------------------------------------- /src/lib/components/resource-templates/Consent.svelte: -------------------------------------------------------------------------------- 1 | 10 | {#if resource.text?.div} 11 | {@html resource.text.div} 12 |
13 | {/if} 14 | {#if resource.category?.[0]} 15 | {#if resource.category[0].coding} 16 | {resource.category[0].coding[0].system} : {resource.category[0].coding[0].code} 17 |
18 | {#if resource.category[0].coding[0].display} 19 | {resource.category[0].coding[0].display} 20 | {:else if resource.category[0].text} 21 | {resource.category[0].text} 22 | {/if} 23 |
24 | {:else if resource.category[0].text} 25 | {resource.category[0].text} 26 |
27 | {/if} 28 | {/if} 29 | {#if resource.provision?.code?.[0].coding} 30 | Intent: {resource.provision?.code?.[0].coding[0].display} 31 | {/if} 32 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Immunization.svelte: -------------------------------------------------------------------------------- 1 | 11 | {#if resource.vaccineCode} 12 | {#if resource.vaccineCode.coding} 13 | {resource.vaccineCode.coding[0].system} : {resource.vaccineCode.coding[0].code} 14 |
15 | {#if resource.vaccineCode.coding[0].display} 16 | {resource.vaccineCode.coding[0].display}
17 | {:else if resource.vaccineCode.text} 18 | {resource.vaccineCode.text}
19 | {/if} 20 | {:else if resource.vaccineCode.text} 21 | {resource.vaccineCode.text}
22 | {/if} 23 | {/if} 24 | 25 | {#if resource.occurrenceDateTime} 26 | Date: {formatDate(resource.occurrenceDateTime)} 27 | {:else if resource.occurrenceString} 28 | Date: {resource.occurrenceString} 29 | {/if} 30 | -------------------------------------------------------------------------------- /classic/templates/Allergies.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Allergies and Intolerancies 7 |
8 |
9 |
    10 | {{each(options.allergies)}} 11 |
  • 12 | {{if(@this.criticality === "high")}} 13 | 14 | {{@this.type}} - {{@this.category[0]}} - Criticality: High 15 | 16 | {{#else}} 17 | 18 | {{@this.type}} - {{@this.category[0]}} - Criticality: {{@this.criticality}} 19 | 20 | {{/if}} 21 | {{if(@this.code && @this.code.coding)}} 22 |
    23 | {{@this.code.coding[0].display}} ({{@this.code.coding[0].code}}) 24 |
    25 | {{/if}} 26 |
  • 27 | {{/each}} 28 |
29 |
30 |
-------------------------------------------------------------------------------- /classic/templates/Problems.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Problems / Diagnoses 7 |
8 |
9 |
    10 | {{each(options.problems)}} 11 |
  • 12 | {{if(options.problems[@index].onsetDateTime)}} 13 | {{@this.onsetDateTime}} 14 | {{/if}} 15 | {{if(options.problems[@index].code && options.problems[@index].code.coding && options.problems[@index].code.coding[0])}} 16 | {{@this.code.coding[0].system}} 17 | {{@this.code.coding[0].display}} ({{@this.code.coding[0].code}}) 18 | {{/if}} 19 | {{if(options.problems[@index].code && options.problems[@index].code.text)}} 20 | [Uncoded text shown]: {{@this.code.text}} 21 | {{/if}} 22 |
  • 23 | {{/each}} 24 |
25 |
26 |
-------------------------------------------------------------------------------- /src/lib/components/resource-templates/Encounter.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | Effective { 13 | resource.period?.start 14 | ? formatDate(resource.period.start) 15 | : '??' 16 | } - { 17 | resource.period?.end 18 | ? formatDate(resource.period.end) 19 | : '??' 20 | } 21 |
22 | {#if resource.status} 23 | Status: {resource.status} 24 | {/if} 25 | {#if resource.reasonCode} 26 | {#if resource.reasonCode[0].coding} 27 | {resource.reasonCode[0].coding[0].system} : {resource.reasonCode[0].coding[0].code} 28 |
29 | {#if resource.reasonCode[0].coding[0].display} 30 | {resource.reasonCode[0].coding[0].display}: 31 | {:else if resource.reasonCode[0].text} 32 | {resource.reasonCode[0].text}: 33 | {/if} 34 | {:else if resource.reasonCode[0].text} 35 | {resource.reasonCode[0].text}: 36 | {/if} 37 | {/if} 38 | -------------------------------------------------------------------------------- /classic/templates/Checks.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Simple Data Checks (not complete FHIR validation) 7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | {{each(options.data)}} 21 | 22 | 23 | 24 | 25 | 26 | {{/each}} 27 |
SectionEntriesNarrative
{{@this.display}}{{@this.entries}}{{@this.narrative}}
28 |
    29 | {{each(options.errors)}} 30 |
  • 31 | {{@this}} 32 |
  • 33 | {{/each}} 34 |
35 |
36 |
-------------------------------------------------------------------------------- /src/lib/components/resource-templates/Location.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {resource.name ?? ""} 11 |
12 | {#if resource.telecom} 13 | 14 | 15 | 16 | 17 | 18 | {#each resource.telecom as telecom} 19 | 20 | 21 | 22 | {/each} 23 | 24 |
Contact Information
{telecom.system ?? ""}{telecom.use ?? ""}{telecom.value ?? ""}
25 | {/if} 26 | {#if resource.address} 27 | {#if resource.address.line} 28 | {#if resource.address.line.length > 0} 29 | {#each resource.address.line as line} 30 | {#if line !== ""} 31 | {line}
32 | {/if} 33 | {/each} 34 | {:else} 35 | {resource.address.line} 36 | {/if} 37 | {/if} 38 | {resource.address.city ?? "" 39 | }{resource.address.state 40 | ? `, ${resource.address.state}` 41 | : '' 42 | }{resource.address.country 43 | ? `, ${resource.address.country}` 44 | : ''} 45 | {resource.address.postalCode ?? ""} 46 | {/if} 47 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Dosage.svelte: -------------------------------------------------------------------------------- 1 | 6 | 7 | {#if dosage} 8 | {#if dosage.text} 9 | Dosage: {dosage.text} 10 | {:else if dosage.asNeededBoolean} 11 | Dosage: as needed 12 | {:else} 13 | No dosage information 14 | {/if} 15 | {#if dosage.route?.coding || dosage.doseAndRate || dosage.timing?.repeat} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 39 | 40 |
Dosage
RouteQtyUnitFreq. QtyFreq. Period
{dosage.route?.coding?.[0].display ?? ''}{dosage.doseAndRate?.[0].doseQuantity?.value ?? ''}{dosage.doseAndRate?.[0].doseQuantity?.unit ?? ''}{dosage.timing?.repeat?.count ?? ''} 34 | {#if dosage.timing?.repeat?.period && dosage.timing?.repeat?.periodUnit} 35 | {dosage.timing?.repeat?.period}{dosage.timing?.repeat?.periodUnit} 36 | {/if} 37 |
41 | {/if} 42 | {:else} 43 | No dosage information 44 | {/if} 45 | -------------------------------------------------------------------------------- /classic/templates/AdvanceDirectives.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Advance Directives 7 |
8 |
9 |
    10 | {{each(options.ad)}} 11 |
  • 12 | Type: {{@this.resourceType}} 13 |
    14 | Text: 15 | {{if (@this.text && @this.text.div)}} 16 | {{@this.text.div}} 17 | {{#else}} 18 | No text provided in resource 19 | {{/if}} 20 |
    21 | Category: 22 | {{if (@this.category && @this.category[0] && @this.category[0].coding && @this.category[0].coding[0])}} 23 | {{@this.category[0].coding[0].display}} 24 | {{/if}} 25 |
    26 | Intent: 27 | {{if (@this.provision && @this.provision.code && @this.provision.code[0] && @this.provision.code[0].coding && @this.provision.code[0].coding[0]) }} 28 | {{@this.provision.code[0].coding[0].display}} 29 | {{/if}} 30 | {{if (@this.description && @this.description.text)}} 31 | {{@this.description.text}} 32 | {{/if}} 33 |
  • 34 | {{/each}} 35 |
36 |
37 |
-------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipsviewer", 3 | "version": "0.0.1", 4 | "description": "IPS Viewer", 5 | "author": { 6 | "name": "More Informatics, Inc.", 7 | "email": "johnd@moreinformatics.com" 8 | }, 9 | "scripts": { 10 | "start": "serve build/", 11 | "dev": "vite dev", 12 | "build": "vite build", 13 | "preview": "vite preview", 14 | "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", 15 | "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", 16 | "lint": "prettier --plugin-search-dir . --check .", 17 | "format": "prettier --plugin-search-dir . --write .", 18 | "debug": "nodemon app -e html,js", 19 | "test": "mocha test/test.js" 20 | }, 21 | "dependencies": { 22 | "base64url": "^3.0.1", 23 | "buffer": "^6.0.3", 24 | "express": "^4.17.1", 25 | "jose": "^4.11.4", 26 | "request": "^2.88.2", 27 | "sveltestrap": "^5.10.0" 28 | }, 29 | "devDependencies": { 30 | "@sveltejs/adapter-auto": "^2.0.0", 31 | "@sveltejs/adapter-static": "^2.0.0", 32 | "@sveltejs/kit": "^1.5.0", 33 | "@types/fhir": "^0.0.41", 34 | "@types/node": "^20.8.7", 35 | "chai": "^4.3.7", 36 | "karma": "^6.4.2", 37 | "karma-chai": "^0.1.0", 38 | "karma-chrome-launcher": "^3.2.0", 39 | "karma-jasmine": "^5.1.0", 40 | "karma-mocha": "^2.0.1", 41 | "karma-requirejs": "^1.1.0", 42 | "mocha": "^10.2.0", 43 | "nodemon": "^2.0.12", 44 | "prettier": "^2.8.0", 45 | "prettier-plugin-svelte": "^2.8.1", 46 | "svelte": "^3.55.1", 47 | "svelte-check": "^3.0.1", 48 | "tslib": "^2.4.1", 49 | "typescript": "^4.9.3", 50 | "vite": "^4.0.0" 51 | }, 52 | "type": "module", 53 | "repository": { 54 | "type": "git", 55 | "url": "https://github.com/jddamore/IPSviewer" 56 | }, 57 | "snyk": true 58 | } 59 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Procedure.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | {#if resource.code} 12 | {#if resource.code.coding} 13 | {resource.code.coding[0].system} : {resource.code.coding[0].code} 14 |
15 | {#if resource.code.coding[0].display} 16 | {resource.code.coding[0].display}
17 | {:else if resource.code.text} 18 | {resource.code.text}
19 | {/if} 20 | {:else if resource.code.text} 21 | {resource.code.text}
22 | {/if} 23 | {/if} 24 | {#if resource.performedDateTime} 25 | Performed: {formatDate(resource.performedDateTime)} 26 | {:else if resource.performedPeriod} 27 | Performed: { 28 | resource.performedPeriod.start 29 | ? formatDate(resource.performedPeriod.start) 30 | : '??' 31 | } - { 32 | resource.performedPeriod.end 33 | ? formatDate(resource.performedPeriod.end) 34 | : '??' 35 | } 36 | {:else if resource.performedString} 37 | Performed: {resource.performedString} 38 | {:else if resource.performedAge} 39 | Performed age: {resource.performedAge.value}{resource.performedAge.code} 40 | {:else if resource.performedRange} 41 | Performed age: { 42 | resource.performedRange.low 43 | ? resource.performedRange.low 44 | : '??' 45 | } - { 46 | resource.performedRange.high 47 | ? resource.performedRange.high 48 | : '??' 49 | } 50 | {/if} 51 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/AllergyIntolerance.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 | {#if resource.clinicalStatus || resource.verificationStatus} 25 | 26 | {resource.clinicalStatus?.coding?.[0].code ?? ''} 27 | {resource.clinicalStatus && 28 | resource.verificationStatus 29 | ? '/' 30 | : ''} 31 | {resource.verificationStatus?.coding?.[0].code ?? ''} 32 | 33 | {/if} 34 | 35 | {resource.type ? `${resource.type} - ` : ''} 36 | criticality: {resource.criticality ?? 'unknown'} 37 | 38 | {#if resource.code} 39 | {#if resource.code.coding} 40 | {resource.code.coding[0].system} : {resource.code.coding[0].code} 41 |
42 | {#if resource.code.coding[0].display} 43 | {resource.code.coding[0].display}
44 | {:else if resource.code.text} 45 | {resource.code.text}
46 | {/if} 47 | {:else if resource.code.text} 48 | {resource.code.text}
49 | {/if} 50 | {/if} 51 | {resource.onsetDateTime ? `Since ${formatDate(resource.onsetDateTime)}` : ''} 52 | -------------------------------------------------------------------------------- /src/lib/utils/util.ts: -------------------------------------------------------------------------------- 1 | // Set context to browser for window and document objects 2 | /// 3 | import type { BundleEntry } from "fhir/r4"; 4 | 5 | export async function base64toBlob(base64:string, type="application/octet-stream") { 6 | let result = await fetch(`data:${type};base64,${base64}`); 7 | return window.URL.createObjectURL(await result.blob()); 8 | } 9 | 10 | // Helper function to format dates as "dd-MMM-yyyy" 11 | export function formatDate(dateStr: string) { 12 | const options: Intl.DateTimeFormatOptions = { day: '2-digit', month: 'short', year: 'numeric' }; 13 | const date = new Date(dateStr); 14 | return date.toLocaleDateString('en-GB', options); 15 | } 16 | 17 | // For machine-readable content, use the reference in the Composition.section.entry to retrieve resource from Bundle 18 | export function getEntry(entries: Array, reference: string) { 19 | let result; 20 | if (!entries) { 21 | return result; 22 | } 23 | for (let entry of entries) { 24 | if (entry.fullUrl?.includes(reference)) { 25 | return entry.resource; 26 | } else { 27 | // Attempt to match based on resource and uuid 28 | let splitReference = reference.split('/'); 29 | let referenceId = splitReference?.pop(); 30 | let referenceResourceType = splitReference?.pop(); 31 | if (referenceResourceType === entry.resource?.resourceType && referenceId && entry.fullUrl?.includes(referenceId)) { 32 | return entry.resource; 33 | } 34 | } 35 | } 36 | 37 | if (!result) { 38 | console.log(`missing reference ${reference}`); 39 | } 40 | return result; 41 | }; 42 | 43 | export function download(filename:string, text:string) { 44 | var element = document.createElement('a'); 45 | element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); 46 | element.setAttribute('download', filename); 47 | 48 | element.style.display = 'none'; 49 | document.body.appendChild(element); 50 | 51 | element.click(); 52 | 53 | document.body.removeChild(element); 54 | } 55 | -------------------------------------------------------------------------------- /classic/assets/html/header.html: -------------------------------------------------------------------------------- 1 |

International Patient Summary (IPS) Viewer for Connectathon

2 |
3 | Links to published Implementation Guide and the latest CI build 5 |
6 |
7 | Please note that this tool is an open-source project under development. It only renders the following sections of 8 | IPS bundles: Advance Directives, Allergies, Immunizations, Medications, Problems and Results. Rendering of FHIR resources 9 | may be incomplete and using the narrative may be necessary in some circumstances. 10 |
11 |
12 |
13 |
14 |
15 |

Submit Data

16 |
17 |
18 |
19 |
20 | 21 |
22 | 23 |
24 |
25 |
26 |
27 |
28 | 29 |
30 | 34 |
35 | 36 |
37 |
38 | 39 |
40 |
41 |
42 |
43 | 44 |
45 | 46 |
47 |
48 |
-------------------------------------------------------------------------------- /src/lib/components/resource-templates/Practitioner.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | {#if resource.name} 12 | 13 | {#if resource.name[0]} 14 | {#if resource.name[0].prefix 15 | || resource.name[0].given 16 | || resource.name[0].family} 17 | {resource.name[0].prefix ?? ""} 18 | {resource.name[0].given ? resource.name[0].given.join(' ') : ""} 19 | {resource.name[0].family ?? ""} 20 | {:else if resource.name[0].text} 21 | {resource.name[0].text} 22 | {/if} 23 | 29 | {/if} 30 | 31 |
32 | {/if} 33 | {#if resource.gender} 34 | Gender: {resource.gender ?? ""}
35 | {/if} 36 | {#if resource.address} 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | {#each resource.address as address} 46 | 47 | 48 | 63 | 64 | {/each} 65 |
UseAddress
{address.use ?? ""} 49 | {#if address.line} 50 | {#each address.line as line} 51 | {line}
52 | {/each} 53 | {/if} 54 | {address.city ?? "[Unknown City]"}{ 55 | address.state 56 | ? `, ${address.state}` 57 | : '' 58 | }{address.country 59 | ? `, ${address.country}` 60 | : ''} 61 | {address.postalCode ?? ""} 62 |
66 | {/if} 67 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | import http from 'http'; 2 | import https from 'https'; 3 | import fs from 'fs'; 4 | import path from 'path'; 5 | import express from 'express'; 6 | 7 | const HTTP_PORT = process.env.HTTP_PORT || 3000; 8 | const HTTPS_PORT = 443; 9 | 10 | const __dirname = path.resolve(); 11 | const buildDir = path.join(__dirname, 'build'); 12 | const index = fs.readFileSync(path.join(buildDir, '404.html'), 'utf-8'); 13 | const appDir = path.join(buildDir, '_app'); 14 | 15 | const app = express(); 16 | 17 | // classic version 18 | const classic = fs.readFileSync('./classic/ips_main.html', 'utf-8'); 19 | const favicon = fs.readFileSync('./classic/favicon.ico'); 20 | 21 | 22 | let privateKey; 23 | let certificate; 24 | let ca; 25 | let credentials; 26 | if (fs.existsSync('./certs/ipsviewer2025.key') && fs.existsSync('./certs/ipsviewer2025.crt') && fs.existsSync('./certs/ipsviewer2025.ca-bundle') ) { 27 | privateKey = fs.readFileSync('./certs/ipsviewer2025.key', 'utf-8'); 28 | certificate = fs.readFileSync('./certs/ipsviewer2025.crt', 'utf-8'); 29 | ca = fs.readFileSync('./certs/ipsviewer2025.ca-bundle', 'utf-8') 30 | credentials = {key: privateKey, cert: certificate, ca: ca}; 31 | } 32 | 33 | app.use('/', express.static(appDir, { immutable: true, maxAge: '1y' })); 34 | 35 | app.use(express.static(buildDir)); 36 | 37 | app.use('/classic/templates', express.static('classic/templates')); 38 | app.use('/classic/assets', express.static('classic/assets')); 39 | 40 | app.get('/classic', (req, res) => { 41 | res.send(classic); 42 | }); 43 | 44 | app.get(['/classic/favicon.ico'], (req, res) => { 45 | res.send(favicon); 46 | }); 47 | 48 | // Catch-all route to serve `index.html` for SPA routing 49 | app.get('*', (req, res) => { 50 | res.send(index); 51 | }); 52 | 53 | var httpServer = http.createServer(app); 54 | let httpsServer; 55 | if (credentials) { 56 | httpsServer = https.createServer(credentials, app); 57 | } 58 | 59 | // httpServer.listen(HTTP_PORT); 60 | //console.log(`listening on HTTP port ${HTTP_PORT}...`); 61 | if (httpsServer) { 62 | httpServer.listen(80); 63 | httpsServer.listen(HTTPS_PORT); 64 | console.log(`listening on HTTP 80 and HTTPS port ${HTTPS_PORT}...`); 65 | } 66 | else { 67 | console.log(`listening on HTTP port ${HTTP_PORT}...`) 68 | httpServer.listen(HTTP_PORT); 69 | console.log('HTTPS server not running...') 70 | } 71 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Medication.svelte: -------------------------------------------------------------------------------- 1 | 11 | 12 | {#if resource.code} 13 | {#if resource.code.coding} 14 | {resource.code.coding[0].system} : {resource.code.coding[0].code} 15 |
16 | {/if} 17 | {/if} 18 | {#if resource.code?.text} 19 | {(codingMap.set(resource.code.text, 1) && undefined) ?? ""} 20 | {resource.code.text}
21 | {/if} 22 | {#if resource.code?.coding} 23 | {#each resource.code.coding as coding, index} 24 | {#if !resource.code?.text && index == 0} 25 | 26 | {#if coding.display && !codingMap.get(coding.display)} 27 | {(codingMap.set(coding.display, 1) && undefined) ?? ""} 28 | {coding.display}
29 | {/if} 30 |
31 | {:else} 32 | {#if coding.display && !codingMap.get(coding.display)} 33 | {(codingMap.set(coding.display, 1) && undefined) ?? ""} 34 | {coding.display}
35 | {/if} 36 | {/if} 37 | {/each} 38 | {/if} 39 | {#if resource.ingredient} 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | {#each resource.ingredient as ingredient} 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | {/each} 61 | 62 |
Composition
IngredientStrength Numerator QtyUnitStrength Denominator QtyStrength Denominator Unit
{ingredient.itemCodeableConcept?.coding?.[0].display}{ingredient.strength?.numerator?.value}{ingredient.strength?.numerator?.unit}{ingredient.strength?.denominator?.value}{ingredient.strength?.denominator?.unit}
63 | {/if} 64 | -------------------------------------------------------------------------------- /classic/templates/Observations.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Observations (Results) 7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{each(options.observations)}} 19 | 20 | 29 | 34 | 46 | {{if(options.observations[@index].category && options.observations[@index].category[0] && options.observations[@index].category[0].coding && options.observations[@index].category[0].coding[0])}} 47 | 50 | {{/if}} 51 | 52 | {{/each}} 53 |
NameDateValueCategory
21 | {{if(options.observations[@index].code && options.observations[@index].code.coding)}} 22 | {{@this.code.coding[0].display}} 23 | ({{@this.code.coding[0].code}}) 24 | {{/if}} 25 | {{if(options.observations[@index].code.text)}} 26 | [Uncoded text shown]: {{@this.code.text}} 27 | {{/if}} 28 | 30 | {{if(options.observations[@index].effectiveDateTime)}} 31 | {{@this.effectiveDateTime}} 32 | {{/if}} 33 | 35 | {{if(options.observations[@index].valueCodeableConcept)}} 36 | {{@this.valueCodeableConcept.coding[0].display}} 37 | {{/if}} 38 | {{if(options.observations[@index].valueQuantity)}} 39 | {{@this.valueQuantity.value}} 40 | {{@this.valueQuantity.unit}} 41 | {{/if}} 42 | {{if(options.observations[@index].valueString)}} 43 | {{@this.valueString}} 44 | {{/if}} 45 | 48 | {{@this.category[0].coding[0].code}} 49 |
54 |
55 |
-------------------------------------------------------------------------------- /src/lib/components/resource-templates/Condition.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 | {#if resource.clinicalStatus || resource.verificationStatus} 25 | 26 | {resource.clinicalStatus?.coding?.[0].code ?? ''} 27 | {resource.clinicalStatus && 28 | resource.verificationStatus 29 | ? '/' 30 | : ''} 31 | {resource.verificationStatus?.coding?.[0].code ?? ''} 32 | 33 | {/if} 34 | severity: {resource.severity?.text ?? 'unknown'} 35 |
36 | {#if resource.category?.[0]} 37 | {#if resource.category[0].coding} 38 | {resource.category[0].coding[0].system} : {resource.category[0].coding[0].code} 39 |
40 | {#if resource.category[0].coding[0].display} 41 | {resource.category[0].coding[0].display} 42 | {:else if resource.category[0].text} 43 | {resource.category[0].text} 44 | {/if} 45 |
46 | {:else if resource.category[0].text} 47 | {resource.category[0].text} 48 |
49 | {/if} 50 | {/if} 51 | {#if resource.code} 52 | {#if resource.code.coding} 53 | {resource.code.coding[0].system} : {resource.code.coding[0].code} 54 |
55 | {#if resource.code.coding[0].display} 56 | {resource.code.coding[0].display}
57 | {:else if resource.code.text} 58 | {resource.code.text}
59 | {/if} 60 | {:else if resource.code.text} 61 | {resource.code.text}
62 | {/if} 63 | {/if} 64 | {#if resource.bodySite?.[0]?.coding?.[0]?.display} 65 | Site: {resource.bodySite[0]?.coding?.[0]?.display}
66 | {/if} 67 | {#if resource.onsetDateTime} 68 | Since: {formatDate(resource.onsetDateTime)}
69 | {/if} 70 | {#if resource.recordedDate} 71 | Recorded: {formatDate(resource.recordedDate)}
72 | {/if} 73 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Goal.svelte: -------------------------------------------------------------------------------- 1 | 30 | 31 | 32 | 33 | {`${resource.resourceType} (${resource.lifecycleStatus})`} 34 | 35 | 36 | 37 | {#if resource.priority} 38 | 39 | priority: 40 | {#if resource.priority.text} 41 | {resource.priority.text} 42 | {:else if resource.priority.coding} 43 | {#each resource.priority.coding as code} 44 | {code.system} : {code.code} 45 | {#if code.display} 46 | ({code.display}) 47 | {/if} 48 | {/each} 49 | {/if} 50 | 51 | {/if} 52 | 53 | 54 | {#if resource.achievementStatus} 55 | 56 | achievement: 57 | {#if resource.achievementStatus.text} 58 | {resource.achievementStatus.text} 59 | {:else if resource.achievementStatus.coding} 60 | {#each resource.achievementStatus.coding as status} 61 | {status.system} : {status.code} 62 | {#if status.display} 63 | ({status.display}) 64 | {/if} 65 | {/each} 66 | {/if} 67 | 68 | {/if} 69 | 70 | {#if resource.priority || resource.achievementStatus} 71 |
72 | {/if} 73 | 74 | 75 | {#if resource.description} 76 | {#if resource.description.text} 77 | {resource.description.text} 78 | {:else if resource.description.coding} 79 | {#each resource.description.coding as code} 80 | {code.system} : {code.code} 81 | {#if code.display} 82 | ({code.display}) 83 | {/if} 84 | {/each} 85 | {/if} 86 | {:else} 87 | No Description Provided 88 | {/if} 89 | 90 | 91 |
92 | {#if startDate === '??' && dueDate === '??'} 93 | No timeline available. 94 | {:else} 95 | Timeline: {startDate} ➔ {dueDate} 96 | {/if} -------------------------------------------------------------------------------- /src/lib/components/resource-templates/MedicationStatement.svelte: -------------------------------------------------------------------------------- 1 | 29 | {#if resource.status} 30 | {resource.status} 31 | {/if} 32 | 33 | {#if resource.medicationCodeableConcept} 34 | {#if resource.medicationCodeableConcept.coding} 35 | {resource.medicationCodeableConcept.coding[0].system} : {resource.medicationCodeableConcept?.coding[0].code} 36 |
37 | {#if resource.medicationCodeableConcept.coding[0].display} 38 | {resource.medicationCodeableConcept.coding[0].display}
39 | {:else if resource.medicationCodeableConcept.text} 40 | {resource.medicationCodeableConcept.text}
41 | {/if} 42 | {:else if resource.medicationCodeableConcept.text} 43 | {#if resource.status} 44 |
45 | {/if} 46 | {resource.medicationCodeableConcept.text}
47 | {/if} 48 | {/if} 49 | 50 | {#if medication} 51 | 52 | {:else if resource.medicationReference?.display} 53 | {resource.medicationReference?.display} 54 |
55 | {/if} 56 | 57 | {#if resource.reasonReference?.[0].display} 58 | {resource.reasonReference?.[0].display}
59 | {/if} 60 | 61 | 62 | 63 | {#if resource.effectivePeriod} 64 | Effective: { 65 | resource.effectivePeriod.start 66 | ? formatDate(resource.effectivePeriod.start) 67 | : '??' 68 | } - { 69 | resource.effectivePeriod.end 70 | ? formatDate(resource.effectivePeriod.end) 71 | : '??' 72 | } 73 | {:else if resource.effectiveDateTime} 74 | Date: {formatDate(resource.effectiveDateTime)} 75 | {/if} -------------------------------------------------------------------------------- /src/lib/components/resource-templates/MedicationRequest.svelte: -------------------------------------------------------------------------------- 1 | 29 | 30 | {resource.intent ? resource.intent : ''} 31 | {resource.status ? `${resource.status}` : ''} 34 |
35 | {#if resource.medicationCodeableConcept} 36 | {#if resource.medicationCodeableConcept.coding} 37 | {#if resource.medicationCodeableConcept.coding[0].system && resource.medicationCodeableConcept.coding[0].code} 38 | {resource.medicationCodeableConcept.coding[0].system} : {resource.medicationCodeableConcept 40 | .coding[0].code} 42 |
43 | {/if} 44 | {#if resource.medicationCodeableConcept.coding[0].display} 45 | {resource.medicationCodeableConcept.coding[0].display}
46 | {:else if resource.medicationCodeableConcept.text} 47 | {resource.medicationCodeableConcept.text}
48 | {/if} 49 | {:else if resource.medicationCodeableConcept.text} 50 | {resource.medicationCodeableConcept.text}
51 | {/if} 52 | {/if} 53 | 54 | {#if medication} 55 | 56 | {:else if resource.medicationReference?.display} 57 | {resource.medicationReference?.display} 58 |
59 | {/if} 60 | 61 | {#if resource.authoredOn} 62 | Authored: {resource.authoredOn.split('T')[0]}
63 | {/if} 64 | Valid: {resource.dispenseRequest?.validityPeriod?.start 65 | ? formatDate(resource.dispenseRequest.validityPeriod.start) 66 | : '??' 67 | } - { 68 | resource.dispenseRequest?.validityPeriod?.end 69 | ? formatDate(resource.dispenseRequest.validityPeriod.end) 70 | : '??' 71 | } 72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/DiagnosticReport.svelte: -------------------------------------------------------------------------------- 1 | 39 | 40 | {#if resource.category?.[0].coding} 41 | {resource.category[0].coding[0].display ?? resource.category[0].coding[0].code} 42 | {/if} 43 | {#if resource.code} 44 | {#if resource.code.coding} 45 | {resource.code.coding[0].system} : {resource.code.coding[0].code} 46 |
47 | {#if resource.code.coding[0].display} 48 | {resource.code.coding[0].display} 49 | {:else if resource.code.text} 50 | {resource.code.text} 51 | {/if} 52 | {:else if resource.code.text} 53 |
{resource.code.text} 54 | {/if} 55 | {/if} 56 |
57 | {#if resource.effectivePeriod} 58 | Effective: {resource.effectivePeriod.start 59 | ? formatDate(resource.effectivePeriod.start) 60 | : '??' 61 | } - { 62 | resource.effectivePeriod.end 63 | ? formatDate(resource.effectivePeriod.end) 64 | : '??' 65 | } 66 | {:else if resource.effectiveDateTime} 67 | Date: {formatDate(resource.effectiveDateTime)} 68 | {/if} 69 |
70 | {#if resource.result} 71 | 72 | 73 | 74 | 75 | 76 | {#each results as result} 77 | 78 |
79 | 83 |
84 | 85 | {/each} 86 | {#each resource.result as result} 87 | {#if result.display} 88 | 89 | 90 | 91 | {/if} 92 | {/each} 93 | 94 |
Result(s)
{result.display}
95 | {/if} 96 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IPS Viewer 2 | 3 | An online viewer for the International Patient Summary (IPS). Currently hosted at https://www.ipsviewer.com 4 | 5 | ## What It Does? 6 | 7 | This repository contains a node.js (JavaScript) express server for a webpage. That webpage allows users to paste in a JSON formatted IPS document according to the standard and view: 8 | 9 | - Textual display of narrative sections 10 | - Machine readable entries with a simple card view 11 | 12 | This tool is not a validator of the IPS standard. The IPS implementation guide current build is here: http://build.fhir.org/ig/HL7/fhir-ips/ 13 | 14 | ## Examples 15 | 16 | Some samples IPS files (in JSON) are included in the "samples" folder. Note that these samples were collected during HL7 and [Global Digital Health Partnership, (GDHP)](https://www.healthit.gov/topic/global-digital-health-partnership) connectathons and through discussions on chat.fhir.org. Organizations may have made changes to their software and technologies without updating samples in this respository. All samples should be considered illustrative for learning purposes and not indicative of any organization or IPS documents in the real-world. 17 | 18 | There are two folders: "connectathon samples" and "validated samples". For samples in the connectathon folder, they may (or may not) validate according to the current [IPS Implementation Guide](http://build.fhir.org/ig/HL7/fhir-ips/). Samples, which may have been edited to validate with no errors (and reduced warnings), may also been copied to validated samples folder. Validated samples have also been tested to render in the IPS Viewer. 19 | 20 | ## How to Run Locally? 21 | 22 | 1. Make sure node/npm is installed on server/desktop 23 | 2. Clone this repository 24 | 3. Install dependencies (```npm i```) 25 | 4. Start express server (```node app.js```) 26 | 27 | By default, app will start with HTTP hosting to localhost. If you want to serve using HTTPS, create a certs folder with key, crt and ca-bundle files. Then change the corresponding filenames in app.js 28 | 29 | ### Developing 30 | 31 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 32 | 33 | ```bash 34 | npm run dev 35 | 36 | # or start the server and open the app in a new browser tab 37 | npm run dev -- --open 38 | ``` 39 | 40 | ### Building 41 | 42 | To create a production version of your app: 43 | 44 | ```bash 45 | npm run build 46 | ``` 47 | 48 | You can preview the production build with `npm run preview`. 49 | 50 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 51 | 52 | 53 | ## Who Supports? 54 | 55 | Maintenance of this repository is provided by John D'Amore, MS (github: jddamore). The hosting of the [online version](https://www.ipsviewer.com) is provided by the [Progress for Informatics and Energy Foundation, Inc](https://betterpie.org). 56 | 57 | This viewer is based on previous work from IPS-Argentina (https://github.com/SALUD-AR/IPS-Argentina). Credit to Alejandro Lopez Osornio, Diego Kaminker and Fernando Campos for their prior work. Thanks to Rob Hausam and Giorgio Cangioli for providing the first samples testing the viewer. Thanks to Daniel Lorigan for multiple contributions! 58 | 59 | ### LICENSE 60 | 61 | See Apache 2.0 License under LICENSE.txt 62 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Observation.svelte: -------------------------------------------------------------------------------- 1 | 48 | 49 | {#if !contained && resource.category?.[0].coding} 50 | {resource.category[0].coding[0].code} 51 | {/if} 52 | {#if resource.code} 53 | {#if resource.code.coding} 54 | {resource.code.coding[0].system} : {resource.code.coding[0].code} 55 |
56 | {#if resource.code.coding[0].display} 57 | {resource.code.coding[0].display}: 58 | {:else if resource.code.text} 59 | {resource.code.text}: 60 | {/if} 61 | {:else if resource.code.text} 62 |
{resource.code.text}: 63 | {/if} 64 | {/if} 65 | {#if resource.valueCodeableConcept?.coding?.[0].display} 66 | {resource.valueCodeableConcept.coding[0].display}
67 | {/if} 68 | {#if resource.valueQuantity} 69 | {resource.valueQuantity.value ?? ""} {resource.valueQuantity.unit ?? ""}
70 | {/if} 71 | {#if resource.valueString} 72 | {resource.valueString ?? ""}
73 | {/if} 74 | {#if resource.note} 75 | {#each resource.note as note} 76 | {#if note.text} 77 | Note: {note.text}
78 | {/if} 79 | {/each} 80 | {/if} 81 | {#if !(resource.valueCodeableConcept || resource.valueQuantity || resource.valueString)} 82 |
83 | {/if} 84 | {#if members.length > 0} 85 | 86 | 87 | 88 | 89 | 90 | {#each members as member} 91 | 92 |
93 | {#if member.resource} 94 | 98 | {:else if member.display} 99 | {member.display} 100 | {/if} 101 |
102 | 103 | {/each} 104 | 105 |
Result(s)
106 | {/if} 107 | {#if resource.effectiveDateTime} 108 | Date: {formatDate(resource.effectiveDateTime)} 109 | {/if} 110 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/OccupationalData.svelte: -------------------------------------------------------------------------------- 1 | 10 | 11 | {#if resource.code.coding?.[0].code} 12 | {#if resource.code.coding[0].code === "74165-2"} 13 | Employment Status 14 | {#if resource.valueCodeableConcept?.coding?.[0].display} 15 |
{resource.valueCodeableConcept?.coding?.[0].display} 16 | {/if} 17 |
18 | {#if resource.effectivePeriod?.start} 19 | {#if resource.effectivePeriod.end} 20 | From {formatDate(resource.effectivePeriod.start)} - {formatDate(resource.effectivePeriod.end)} 21 | {:else} 22 | Since {formatDate(resource.effectivePeriod.start)} 23 | {/if} 24 | {:else if resource.effectiveDateTime} 25 | Since {formatDate(resource.effectiveDateTime)} 26 | {/if} 27 | {:else if resource.code.coding[0].code === "87510-4"} 28 | Retirement Date 29 | {#if resource.valueDateTime} 30 |
{resource.valueDateTime} 31 | {/if} 32 |
33 | {:else if resource.code.coding[0].code === "87511-2"} 34 | Combat Zone Period 35 | {#if resource.valuePeriod?.start} 36 |
37 | {#if resource.valuePeriod.end} 38 | From {formatDate(resource.valuePeriod.start)} - {formatDate(resource.valuePeriod.end)} 39 | {:else} 40 | Since {formatDate(resource.valuePeriod.start)} 41 | {/if} 42 | {/if} 43 | {:else if resource.code.coding[0].code === "11341-5"} 44 | Job History 45 | {#if resource.effectivePeriod?.start} 46 | {#if resource.effectivePeriod.end} 47 | From {formatDate(resource.effectivePeriod.start)} - {formatDate(resource.effectivePeriod.end)} 48 | {:else} 49 | Since {formatDate(resource.effectivePeriod.start)} 50 | {/if} 51 | {:else if resource.effectiveDateTime} 52 | Since {formatDate(resource.effectiveDateTime)} 53 | {/if} 54 | {#if resource.valueCodeableConcept} 55 | {#if resource.valueCodeableConcept.coding} 56 | {#each resource.valueCodeableConcept.coding as coding} 57 | {coding.system} : {coding.code} 58 |
59 | {#if coding.display} 60 | {coding.display} 61 | {/if} 62 | {/each} 63 | {:else if resource.valueCodeableConcept.text} 64 | {resource.valueCodeableConcept.text} 65 | {/if} 66 | {/if} 67 | {#if resource.component} 68 |
69 | {#each resource.component as component} 70 |
71 | {#if component.valueCodeableConcept} 72 | {#if component.valueCodeableConcept.coding} 73 | {#each component.valueCodeableConcept.coding as coding} 74 | {coding.system} : {coding.code} 75 |
76 | {#if coding.display} 77 | {coding.display} 78 | {/if} 79 | {/each} 80 | {:else if component.valueCodeableConcept.text} 81 | {component.valueCodeableConcept.text} 82 | {/if} 83 | {/if} 84 | {#if component.valueQuantity && component.code?.coding} 85 | {component.valueQuantity.value}{ 86 | component.valueQuantity.unit ?? "" 87 | }{component.code.coding[0].code === "74160-3" 88 | ?"/week" 89 | : (component.code.coding[0].code === "87512-0" 90 | ? "/day" 91 | : "")} 92 | {/if} 93 | {#if component.valueString && component.code?.coding} 94 | {component.code.coding[0].code === "87729-0" 95 | ? "Hazard:" 96 | : "" 97 | }{component.valueString} 98 | {/if} 99 | {/each} 100 | {/if} 101 | 102 | 103 | {/if} 104 | {/if} 105 | -------------------------------------------------------------------------------- /classic/ips_main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | 15 | 16 | 17 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | IPS Viewer 33 | 34 | 35 | 36 | 37 | 38 | 40 | 41 | 42 | 43 |
44 |

Patient Summary Viewer 45 | 62 |

63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 | 91 |
92 | 93 |
94 |
95 |
96 | 97 | 98 | 99 | 100 | 101 |
102 | 104 | 105 |
106 |
107 | 108 | 109 | -------------------------------------------------------------------------------- /src/lib/utils/shlClient.ts: -------------------------------------------------------------------------------- 1 | import base64url from 'base64url'; 2 | import * as jose from 'jose'; 3 | import { Buffer } from 'buffer'; 4 | 5 | export interface SHLinkConnectRequest { 6 | shl: string; 7 | recipient: string; 8 | passcode?: string; 9 | } 10 | 11 | export interface SHLinkConnectResponse { 12 | state: string; 13 | shcs: string[]; 14 | jsons: string[]; 15 | } 16 | 17 | export interface SHLClientStateDecoded { 18 | url: string; 19 | key: string; 20 | recipient: string; 21 | passcode?: string; 22 | } 23 | 24 | export interface SHLDecoded { 25 | url: string; 26 | key: string; 27 | flag?: string; 28 | label?: string; 29 | } 30 | 31 | export interface SHLManifestFile { 32 | files: { 33 | contentType: string; 34 | location: string; 35 | embedded?: string; 36 | }[]; 37 | } 38 | 39 | export function randomStringWithEntropy(entropy: number) { 40 | const b = new Uint8Array(entropy); 41 | crypto.getRandomValues(b); 42 | return base64url.encode(b.buffer as Buffer); 43 | } 44 | 45 | export function decodeBase64urlToJson(s: string): T { 46 | return JSON.parse(Buffer.from(s, 'base64').toString()) as T; 47 | } 48 | 49 | export function decodeToJson(s: Uint8Array): T { 50 | return JSON.parse(new TextDecoder().decode(s)) as T; 51 | } 52 | 53 | export interface Manifest { 54 | file: { contentType: string; location: string }[]; 55 | } 56 | 57 | export function flag(config: { shl: string }) { 58 | const shlBody = config.shl.split(/^(?:.+:\/.+#)?shlink:\//)[1]; 59 | const parsedShl: SHLDecoded = decodeBase64urlToJson(shlBody); 60 | return parsedShl?.flag; 61 | } 62 | 63 | function needPasscode(config: { shl: string }) { 64 | const shlBody = config.shl.split(/^(?:.+:\/.+#)?shlink:\//)[1]; 65 | const parsedShl: SHLDecoded = decodeBase64urlToJson(shlBody); 66 | if (parsedShl.flag?.includes('P')) { 67 | return true; 68 | } 69 | 70 | return false; 71 | } 72 | 73 | export function id(config: { shl: string }) { 74 | const shlBody = config.shl.split(/^(?:.+:\/.+#)?shlink:\//)[1]; 75 | const parsedShl: SHLDecoded = decodeBase64urlToJson(shlBody); 76 | return new URL(parsedShl?.url).href.split("/").pop(); 77 | } 78 | 79 | export async function retrieve(configIncoming: SHLinkConnectRequest | {state: string}) { 80 | const config: SHLinkConnectRequest = configIncoming["state"] ? JSON.parse(base64url.decode(configIncoming["state"])) : configIncoming 81 | const shlBody = config.shl.split(/^(?:.+:\/.+#)?shlink:\//)[1]; 82 | const parsedShl: SHLDecoded = decodeBase64urlToJson(shlBody); 83 | const manifestResponse = await fetch(parsedShl.url, { 84 | method: 'POST', 85 | headers: { 86 | 'content-type': 'application/json', 87 | }, 88 | body: JSON.stringify({ 89 | passcode: config.passcode, 90 | recipient: config.recipient, 91 | }), 92 | }); 93 | let isJson = false; 94 | let manifestResponseContent; 95 | manifestResponseContent = await manifestResponse.text(); 96 | try { 97 | manifestResponseContent = JSON.parse(manifestResponseContent); 98 | isJson = true; 99 | } catch (error) { 100 | console.warn("Manifest did not return JSON object"); 101 | } 102 | 103 | if (!manifestResponse.ok || !isJson) { 104 | return { 105 | status: manifestResponse.status, 106 | error: (manifestResponseContent ?? "") 107 | }; 108 | } else { 109 | const decryptionKey = Buffer.from(parsedShl.key, 'base64'); 110 | const shcFiles = (manifestResponseContent as SHLManifestFile).files 111 | .filter((f) => f.contentType === 'application/smart-health-card') 112 | .map(async (f) => { 113 | if (f.embedded !== undefined) { 114 | return f.embedded 115 | } else { 116 | return fetch(f.location).then((f) => f.text()) 117 | } 118 | }); 119 | 120 | const shcFilesDecrypted = shcFiles.map(async (f) => { 121 | const decrypted = await jose.compactDecrypt(await f, decryptionKey); 122 | const decoded = new TextDecoder().decode(decrypted.plaintext); 123 | return decoded; 124 | }); 125 | 126 | const shcs = (await Promise.all(shcFilesDecrypted)).flatMap((f) => JSON.parse(f)['verifiableCredential'] as string); 127 | 128 | const jsonFiles = (manifestResponseContent as SHLManifestFile).files 129 | .filter((f) => f.contentType === 'application/fhir+json') 130 | .map(async (f) => { 131 | if (f.embedded !== undefined) { 132 | return f.embedded 133 | } else { 134 | return fetch(f.location).then((f) => f.text()) 135 | } 136 | }); 137 | 138 | const jsonFilesDecrypted = jsonFiles.map(async (f) => { 139 | const decrypted = await jose.compactDecrypt(await f, decryptionKey); 140 | const decoded = new TextDecoder().decode(decrypted.plaintext); 141 | return decoded; 142 | }); 143 | 144 | const jsons = (await Promise.all(jsonFilesDecrypted)).flatMap((f) => JSON.parse(f)); 145 | 146 | 147 | const result: SHLinkConnectResponse = { shcs, jsons, state: btoa(JSON.stringify(config))}; 148 | 149 | return result; 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /classic/templates/Medications.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | 5 | 6 | Current Medications 7 |
8 |
9 |
    10 | {{each(options.medications)}} 11 |
  • 12 | {{@this.statement.resourceType}} 13 |
    14 | {{if(options.medications[@index].medication.code && options.medications[@index].medication.code.coding && options.medications[@index].medication.code.coding.length)}} 15 | {{each(options.medications[@index].medication.code.coding)}} 16 | {{@this.system}} 17 | {{if (@this.display)}} 18 | {{@this.display}} 19 | {{#else }} 20 | [Coded medication without display] 21 | {{/if }} 22 | {{if (@this.code)}} 23 | ({{@this.code}}) 24 | {{ /if }} 25 |
    26 | {{/each}} 27 | {{if(@this.statement.medicationCodeableConcept && @this.statement.medicationCodeableConcept.text)}} 28 | Original Text: {{@this.statement.medicationCodeableConcept.text}} 29 | {{ /if }} 30 |
    31 | {{#else}} 32 | {{if(options.medications[@index].medication.code)}} 33 | (Uncoded) {{@this.medication.code.text}}
    34 | {{#else}} 35 | (Uncoded) 36 | {{if(@this.statement.medicationCodeableConcept && @this.statement.medicationCodeableConcept.text) }} 37 | {{@this.statement.medicationCodeableConcept.text}} 38 | {{/if}} 39 | {{if(@this.statement.medicationReference && @this.statement.medicationReference.display)}} 40 | {{@this.statement.medicationReference.display}} 41 | {{/if}} 42 |
    43 | {{/if }} 44 | {{/if}} 45 | {{if(options.medications[@index].medication.ingredient && options.medications[@index].medication.ingredient.itemCodeableConcept)}} 46 | {{each(options.medications[@index].medication.ingredient)}} 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 |
    Composition
    IngredientStrength Numerator QtyUnitStrength Denominator QtyStrength Denominator Unit
    {{@this.itemCodeableConcept.coding[0].display}}{{@this.strength.numerator.value}}{{@this.strength.numerator.unit}}{{@this.strength.denominator.value}}{{@this.strength.denominator.unit}}
    66 | {{/each}} 67 | {{/if}} 68 | {{if(options.medications[@index].statement.dosage && options.medications[@index].statement.dosage[0].route && options.medications[@index].statement.dosage[0].route.coding && options.medications[@index].statement.dosage[0].doseAndRate)}} 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | {{if(options.medications[@index].statement.dosage[0].timing && options.medications[@index].statement.dosage[0].timing.repeat)}} 85 | 86 | 87 | {{/if}} 88 | 89 |
    Dosage
    RouteQtyUnitFreq. QtyFreq. Period
    {{@this.statement.dosage[0].route.coding[0].display}}{{@this.statement.dosage[0].doseAndRate[0].doseQuantity.value}}{{@this.statement.dosage[0].doseAndRate[0].doseQuantity.unit}}{{@this.statement.dosage[0].timing.repeat.count}}{{@this.statement.dosage[0].timing.repeat.periodUnit}}
    90 | {{/if}} 91 | {{if (options.medications[@index].statement && options.medications[@index].statement.reasonCode)}} 92 | {{each(options.medications[@index].statement.reasonCode) }} 93 | Indication: 94 | {{ if(@this.text) }} 95 | {{@this.text}} 96 | {{ #else }} 97 | {{if (@this.coding && @this.coding[0] && @this.coding[0].display) }} 98 | {{@this.coding[0].display}} 99 | {{ #else }} 100 | Indication without display 101 | {{ /if }} 102 | {{ /if }} 103 | {{/each}} 104 | {{/if}} 105 |
  • 106 | {{/each}} 107 |
108 |
109 |
-------------------------------------------------------------------------------- /classic/assets/js/test.js: -------------------------------------------------------------------------------- 1 | // Note that this JavaScript should be removed from production 2 | let index = 0; 3 | 4 | var filesToTest = [ 5 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/AT_ELGA_GmbH_01.json', 6 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/DE_no_info_with_Advance_Directive.json', 7 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/DK_Jens_Villadsen_01.json', 8 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/EU_Giorgio_Cangioli_01.json', 9 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/HK_IPS_Sample1.json', 10 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/IPS_health_RIS_minimal.json', 11 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/IPS_IG-bundle-01.json', 12 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/IPS_IG_bundle-minimal.json', 13 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/IPS_IG_bundle-no-info-required-sections.json', 14 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/NL_Curavista_01.json', 15 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/NZ_Peter_Jordan_AAA1234.json', 16 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/NZ_Peter_Jordan_NNJ9186.json', 17 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/validated_samples/US_no_info_with_Advance_Directive.json', 18 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/AR_Repository_Example_01.json', 19 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/AR_Repository_Example_02.json', 20 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/AT_ELGA_GmbH_01.json', 21 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CA-IPS-Bundle1Example.json', 22 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CA_Bundle_FullsomeScenario1.json', 23 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CA_PuraJuniper_01-modified.json', 24 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CH_HL7CH_Examples_01.json', 25 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CY_194315.json', 26 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CY_249867.json', 27 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/CY_Andreas_Ioannou_01.json', 28 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/DK_Jens_Villadsen_01.json', 29 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/EU_Giorgio_Cangioli_01.json', 30 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/EU_Giorgio_Cangioli_02.json', 31 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/EU_Giorgio_Cangioli_03.json', 32 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/HK_IPS_Sample1.json', 33 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/HK_IPS_Sample2.json', 34 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/HK_IPS_Sample3.json', 35 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/HK_IPS_Sample_with_medication.json', 36 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/NL_Curavista_01.json', 37 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/NL_Drimpy_01.json', 38 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/NZ_Peter_Jordan_AAA1234.json', 39 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/NZ_Peter_Jordan_NNJ9186.json', 40 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/TW_Li-Hui_Lee_01-modified.json', 41 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/UK_NHSx_IPS_Example_01-modified.json', 42 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/UK_NHSx_IPS_Example_02-modified.json', 43 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/US_Dynamic_Health_IT_Happy_Kid_FHIR_Bundle-IPS.json', 44 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/US_Interoperability_Institute_Jared_Bruce_Adams-IPS.json', 45 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/US_Interoperability_Institute_Louis_Daniel_Saunders-IPS.json', 46 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/US_Interoperability_Institute_Pearl Holmes Levine-IPS.json', 47 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/US_Interoperability_Institute_Rose Cox Burnett-IPS.json', 48 | 'https://raw.githubusercontent.com/jddamore/IPSviewer/main/samples/connectathon_samples/US_Interoperability_Institute_Troy Dudley Gross-IPS.json' 49 | ] 50 | 51 | const logThis = function (content) { 52 | content = content.toString(); 53 | if (content.slice(0,5).toLowerCase() ==='error') $('#testlog').append(`
${content}
`) 54 | else $('#testlog').append(`
${content}
`) 55 | } 56 | 57 | $(document).ready(function () { 58 | $('#test').click(function () { 59 | window.console.log = logThis; 60 | alert('You have found a magic button that loads 40 samples and outputs debugging console.log information below. Refresh browser before re-using viewer.'); 61 | runNext(); 62 | }); 63 | }); 64 | 65 | const runNext = function () { 66 | if (index < filesToTest.length) { 67 | $.getJSON(`${filesToTest[index]}`, function () { 68 | console.log(`testing: ${filesToTest[index]}`); 69 | }) 70 | .done(function (data) { 71 | $('#ipsInput').val(JSON.stringify(data)); 72 | update(data); 73 | setTimeout(function () { 74 | index++; 75 | runNext(); 76 | }, 100) 77 | }) 78 | .fail(function (e) { 79 | console.log("error", e); 80 | }); 81 | 82 | } 83 | else index = 0; 84 | } 85 | 86 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/Patient.svelte: -------------------------------------------------------------------------------- 1 | 12 | 13 | {#if resource.name} 14 | 15 | {#if resource.name[0]} 16 | {resource.name[0].prefix ?? ""} 17 | {resource.name[0].given ? resource.name[0].given.join(' ') : ""} 18 | {resource.name[0].family ?? ""} 19 | 25 | {/if} 26 | 27 |
28 | {/if} 29 | 30 | {#if resource.birthDate} 31 | Birth Date: {formatDate(resource.birthDate)}
32 | {/if} 33 | {#if resource.gender} 34 | Gender: {resource.gender ?? ""}
35 | {/if} 36 | {#if resource.telecom || resource.address || resource.contact} 37 | 47 | {#if showContact} 48 | {#if resource.telecom} 49 | 50 | 51 | 52 | 53 | {#each resource.telecom as telecom} 54 | 55 | 56 | 57 | 58 | 59 | {/each} 60 |
Contact Information
{telecom.system ?? ""}{telecom.use ?? ""}{telecom.value ?? ""}
61 | {/if} 62 | {#if resource.address} 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | {#each resource.address as address} 72 | 73 | 74 | 89 | 90 | {/each} 91 |
UseAddress
{address.use ?? ""} 75 | {#if address.line} 76 | {#each address.line as line} 77 | {line}
78 | {/each} 79 | {/if} 80 | {address.city ?? "[Unknown City]"}{ 81 | address.state 82 | ? `, ${address.state}` 83 | : '' 84 | }{address.country 85 | ? `, ${address.country}` 86 | : ''} 87 | {address.postalCode ?? ""} 88 |
92 | {/if} 93 | {#if resource.contact} 94 | {#each resource.contact as contact} 95 | Emergency Contact:
96 | {#if contact.relationship} 97 | {#each contact.relationship as relationship} 98 | {#if relationship.coding && relationship.coding[0].display} 99 | {relationship.coding[0].display} 100 | {/if} 101 | {/each} 102 |
103 | {/if} 104 | {#if contact.name} 105 | 106 | {contact.name.prefix ?? ""} 107 | {contact.name.given ? contact.name.given.join(' ') : ""} 108 | {contact.name.family ?? ""} 109 | 110 |
111 | {/if} 112 | {#if contact.gender} 113 | Gender: {contact.gender ?? ""}
114 | {/if} 115 | {#if contact.telecom} 116 | 117 | 118 | 119 | 120 | {#each contact.telecom as telecom} 121 | 122 | 123 | 124 | 125 | 126 | {/each} 127 |
Contact Information
{telecom.system ?? ""}{telecom.use ?? ""}{telecom.value ?? ""}
128 | {/if} 129 | {#if contact.address} 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 155 | 156 |
UseAddress
{contact.address.use ?? ""} 141 | {#if contact.address.line} 142 | {#each contact.address.line as line} 143 | {line}
144 | {/each} 145 | {/if} 146 | {contact.address.city ?? "[Unknown City]"}{ 147 | contact.address.state 148 | ? `, ${contact.address.state}` 149 | : '' 150 | }{contact.address.country 151 | ? `, ${contact.address.country}` 152 | : ''} 153 | {contact.address.postalCode ?? ""} 154 |
157 | {/if} 158 | {/each} 159 | {/if} 160 | {/if} 161 | {/if} 162 | -------------------------------------------------------------------------------- /src/routes/+layout.svelte: -------------------------------------------------------------------------------- 1 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | International Patient Summary 117 | 118 | 119 | 124 | 125 | 126 | 127 | 128 | Displaying FHIR Resources Using: 129 | 130 | 131 | 132 | {displayModeText} 133 | Display Mode 134 | 135 | 136 | {#each Object.entries(displayModes) as [mode, {buttonText, dropdownText}]} 137 | { 139 | setMode(mode); 140 | }}> 141 | 142 | 143 | {dropdownText} 144 | 145 | 146 | {#if mode === $displayMode} {/if} 147 | 148 | 149 | 150 | {/each} 151 | 152 | 153 | 154 | 155 | 156 | 160 |

International Patient Summary (IPS) Viewer for Connectathon

161 | 165 |
166 | Please note that this tool is an open-source project under development. Rendering of FHIR resources 167 | may be incomplete and using the narrative may be necessary in some circumstances. 168 |
169 |
170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 190 | 191 | 192 |
193 | 194 | 210 | -------------------------------------------------------------------------------- /src/lib/components/resource-templates/AdvanceDirective.svelte: -------------------------------------------------------------------------------- 1 | 32 | 33 |
34 | 35 | 46 | 47 | {#if resource.category} 48 | Category: 49 | {resource.category?.[0].coding?.[0].display} (LOINC {resource.category?.[0].coding?.[0].code}) 50 |
51 | {/if} 52 | {#if resource.type?.coding} 53 | Type: 54 | 55 | {#if resource.type?.coding?.[0]} 56 | {resource.type?.coding?.[0].display} (LOINC {resource.type?.coding?.[0].code}) 57 | {/if} 58 | {#if resource.type?.coding?.[1]} 59 | {resource.type?.coding?.[1].display} (LOINC {resource.type?.coding?.[1].code}) 60 | {/if} 61 |
62 | {/if} 63 | {#if resource.description} 64 | Description: {resource.description} 65 |
66 | {/if} 67 | {#if resource.author?.[0].display} 68 | Author: {resource.author[0].display} 69 |
70 | {/if} 71 | {#if resource.identifier?.[0].system == 'https://mydirectives.com/standards/terminology/namingSystem/setId'} 72 | setId: {resource.identifier[0].value} 73 |
74 | {/if} 75 | {#if resource.extension?.[0].url == 'http://hl7.org/fhir/us/ccda/StructureDefinition/VersionNumber'} 76 | 77 | Version number: {resource.extension[0].valueInteger} 78 |
79 | {/if} 80 | 87 | 88 | {#if resource.status} 89 | Status: {resource.status} 90 |
91 | {/if} 92 | 93 | 94 | {#if resource.extension} 95 | {#each resource.extension as ext} 96 | {#if ext.url == 'http://hl7.org/fhir/us/pacio-adi/StructureDefinition/adi-document-revoke-status-extension'} 97 | Revoke Status: {ext.valueCoding?.code} 98 |
99 | {/if} 100 | {/each} 101 | {/if} 102 | 103 | {#if resource.docStatus} 104 | docStatus: {resource.docStatus} 105 |
106 | {/if} 107 | {#if resource.description} 108 | {resource.description} 109 |
110 | {/if} 111 | 112 | {#if resource.isPolst && (resource.isCpr || resource.isComfortTreatments || resource.isAdditionalTx || resource.isMedicallyAssisted)} 113 |
114 | POLST Details: 115 |
    116 | {#if resource.isCpr} 117 |
      118 | 119 | {#if resource.doNotPerformCpr} 120 | This includes an order to NOT perform CPR. 121 | {:else} 122 | This includes an order to perform CPR. 123 | {/if} 124 | 125 |
    126 | {/if} 127 | 128 | {#if resource.isComfortTreatments} 129 |
      130 | {#if resource.doNotPerformComfortTreatments} 131 | This includes an order to NOT perform treatments: {@html resource.detailComfortTreatments} 132 | {:else} 133 | This includes an order to perform {resource.typeComfortTreatments ? `${resource.typeComfortTreatments.toLowerCase()}` : 'treatments'}: {@html resource.detailComfortTreatments} 134 | {/if} 135 |
    136 | {/if} 137 | 138 | {#if resource.isAdditionalTx} 139 |
      140 | {#if resource.doNotPerformAdditionalTx} 141 | This includes an order to NOT perform additional treatments: {@html resource.detailAdditionalTx} 142 | {:else} 143 | This includes an order to perform additional treatments: {@html resource.detailAdditionalTx} 144 | {/if} 145 |
    146 | {/if} 147 | 148 | {#if resource.isMedicallyAssisted} 149 |
      150 | {#if resource.doNotPerformMedicallyAssisted} 151 | This includes an order to NOT perform medically assisted nutrition: {@html resource.detailMedicallyAssisted} 152 | {:else} 153 | This includes an order to perform medically assisted nutrition: {@html resource.detailMedicallyAssisted} 154 | {/if} 155 |
    156 | {/if} 157 |
158 | {/if} 159 | 160 | {#if resource.content} 161 | 163 | {#if resource.content[0].attachment.creation} 164 | Created: {formatDate(resource.content[0].attachment.creation)} 165 |
166 | {/if} 167 | {#if resource.pdfSignedDate} 168 | Digitally signed: {formatDate(resource.pdfSignedDate)} 169 |
170 | {/if} 171 | {#each resource.content as content} 172 | {#if content.attachment.contentType === "application/pdf" && content.attachment.data} 173 | PDF present: 174 | {#await base64toBlob(content.attachment.data, content.attachment.contentType)} 175 | Loading PDF... 176 | {:then url} 177 | View 178 | {/await} 179 | {/if} 180 | {/each} 181 | {/if} 182 | 183 |
184 | 185 | 200 | -------------------------------------------------------------------------------- /src/lib/components/viewer/Demo.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 172 | 173 | 174 | 175 |

Submit Data

176 |

This is for test data only. Please do not submit PHI.

177 | 178 | 179 | 180 | 181 |
182 | 183 | 184 | 185 | 186 | {#if submitted} 187 | 188 | {/if} 189 | 190 | 191 | 192 | Repository of IPS Samples 193 | 194 | 195 | 196 | 197 | {#if checksResult} 198 | 199 | 200 | Simple Data Checks (not complete FHIR validation) 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | {#each checksResult.data as result} 215 | 216 | 217 | 218 | 219 | 220 | {/each} 221 |
SectionEntriesNarrative
{result.display}{result.entries}{result.narrative}
222 |
    223 | {#each checksResult.errors as error} 224 |
  • 225 | {error} 226 |
  • 227 | {/each} 228 |
229 |
230 |
231 | {/if} 232 | 233 |
234 | 235 | {#if bundle} 236 | 237 | 238 | 239 | {/if} 240 | 241 | -------------------------------------------------------------------------------- /src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | {#if showError} 170 | 171 | {@html errorMessage} 172 | 173 | {:else if loading} 174 | 175 | 176 | {@html status} 177 | 178 | 179 | 180 | {:else if shlContents.length > 1 || SHOW_VIEWER_DEMO} 181 | 182 | 183 | {#each shlContents as contents, index} 184 | 185 | {getTabLabel(contents)} 186 | 187 | 188 | {/each} 189 | {#if SHOW_VIEWER_DEMO} 190 | 191 | IPS Demo 192 | 193 | 194 | {/if} 195 | 196 | {:else} 197 | 198 | 199 | {/if} 200 | 201 | 246 | -------------------------------------------------------------------------------- /src/lib/components/viewer/IPSContent.svelte: -------------------------------------------------------------------------------- 1 | 170 | 171 | 180 | 181 | 182 | 183 |
184 |
{json}
185 |
186 | 187 |
188 | 189 | 190 | 191 | 196 | 202 | 203 | 204 | 205 |
206 |
207 | 208 | {#if showInfo} 209 | {infoMessage} 210 | {/if} 211 | {#each Object.entries(ipsContent) as [title, sectionContent]} 212 | 213 | 214 | 215 | 216 |
{title}
217 | {#if sectionContent.useText || mode === "text"} 218 | {@html sectionContent.section.text?.div} 219 | {:else} 220 | 221 | {#each sectionContent.entries as resource, index} 222 | 0 ? "border-top" : ""}> 223 | 224 | 225 | {#if mode === "app" && resource.resourceType in components} 226 | 230 | {:else} 231 | {#if mode === "app"} 232 | {showInfoMessage(`Unsupported sections displayed using composition narratives`)}; 233 | {/if} 234 | {/if} 235 | 236 | 237 | 245 | 246 | 247 | 248 | {/each} 249 | 250 | {/if} 251 |
252 |
253 |
254 | {/each} 255 | 256 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2021 More Informatics, inc. 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /samples/connectathon_archive/TW_Li-Hui_Lee_01-modified.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Bundle", 3 | "id" : "bun-example-tw-1", 4 | "meta" : { 5 | "profile" : [ 6 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Bundle-dccvs" 7 | ] 8 | }, 9 | "identifier" : { 10 | "system" : "https://www.cdc.gov.tw/", 11 | "value" : "URN:UVCI:01:TW:10807843F94AEE0EE5093FBC254BD813#B", 12 | "period" : { 13 | "start" : "2021-05-14", 14 | "end" : "2021-05-28" 15 | } 16 | }, 17 | "type" : "document", 18 | "timestamp" : "2021-05-14T14:30:00+01:00", 19 | "entry" : [ 20 | { 21 | "fullUrl" : "urn:uuid:30551ce1-5a28-4356-b684-1e639095ad5d", 22 | "resource" : { 23 | "resourceType" : "Composition", 24 | "id" : "Inline-Composition-example", 25 | "meta" : { 26 | "profile" : [ 27 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Composition-dccvs" 28 | ] 29 | }, 30 | "text" : { 31 | "status" : "generated", 32 | "div" : "

Generated Narrative

identifier: id: URN:UVCI:01:TW:10807843F94AEE0EE5093FBC254BD813#B

status: final

type: Immunization summary report

date: May 14, 2021, 6:30:00 AM

author: See above (Organization/Inline-Organization-hos-example)

title: TWDCC-Vaccination Status 臺灣COVID疫苗接種數位證明

Attesters

-ModeParty
*officialSee above (Organization/Inline-Organization-CDC-example)
" 33 | }, 34 | "identifier" : { 35 | "system" : "https://www.cdc.gov.tw/", 36 | "value" : "URN:UVCI:01:TW:10807843F94AEE0EE5093FBC254BD813#B" 37 | }, 38 | "status" : "final", 39 | "type" : { 40 | "coding" : [ 41 | { 42 | "system" : "http://loinc.org", 43 | "code" : "82593-5", 44 | "display" : "Immunization summary report" 45 | } 46 | ] 47 | }, 48 | "subject" : { 49 | "reference" : "urn:uuid:2b90dd2b-2dab-4c75-9bb9-a365e07401e9" 50 | }, 51 | "date" : "2021-05-14T14:30:00+08:00", 52 | "author" : [ 53 | { 54 | "reference" : "urn:uuid:15d9e5d7-4c89-4a63-a723-efc4c442acfd" 55 | } 56 | ], 57 | "title" : "TWDCC-Vaccination Status 臺灣COVID疫苗接種數位證明", 58 | "attester" : [ 59 | { 60 | "mode" : "official", 61 | "party" : { 62 | "reference" : "urn:uuid:45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd3" 63 | } 64 | } 65 | ], 66 | "section" : [ 67 | { 68 | "title" : "History of immunization Narrative", 69 | "code" : { 70 | "coding" : [ 71 | { 72 | "system" : "http://loinc.org", 73 | "code" : "11369-6", 74 | "display" : "History of immunization Narrative" 75 | } 76 | ] 77 | }, 78 | "text" : { 79 | "status" : "extensions", 80 | "div" : "

History of immunization Narrative

Vaccine marketing authorizati on holder or Vaccine manufacturer: AstraZeneca AB

Vaccine medicinal product: Vaxzevria

status: completed

vaccineCode: covid-19 vaccines

patient: Patient/pat-example-tw-1

occurrence: 2021-05-14

location: Location/loc-example-tw-1

lotNumber: CTMAV509

performer: Practitioner/pra-example-tw-1

ProtocolApplieds

-TargetDiseaseDoseNumber[x]SeriesDoses[x]
*COVID-1912
" 81 | }, 82 | "entry" : [ 83 | { 84 | "reference" : "urn:uuid:c220e36c-eb67-4fc4-9ba1-2fabc52acec4" 85 | } 86 | ] 87 | } 88 | ] 89 | } 90 | }, 91 | { 92 | "fullUrl" : "urn:uuid:2b90dd2b-2dab-4c75-9bb9-a365e07401e9", 93 | "resource" : { 94 | "resourceType" : "Patient", 95 | "id" : "Inline-Patient-example", 96 | "meta" : { 97 | "profile" : [ 98 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Patient-dcc" 99 | ] 100 | }, 101 | "text" : { 102 | "status" : "generated", 103 | "div" : "

Generated Narrative

identifier: id: 310942728

name: 王大明(OFFICIAL)

gender: male

birthDate: 1990-01-01

" 104 | }, 105 | "identifier" : [ 106 | { 107 | "system" : "http://www.boca.gov.tw/", 108 | "value" : "310942728" 109 | } 110 | ], 111 | "name" : [ 112 | { 113 | "use" : "official", 114 | "text" : "王大明", 115 | "family" : "WANG", 116 | "given" : [ 117 | "DAMING" 118 | ] 119 | } 120 | ], 121 | "gender" : "male", 122 | "birthDate" : "1990-01-01" 123 | } 124 | }, 125 | { 126 | "fullUrl" : "urn:uuid:45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd3", 127 | "resource" : { 128 | "resourceType" : "Organization", 129 | "id" : "Inline-Organization-CDC-example", 130 | "meta" : { 131 | "profile" : [ 132 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dcc" 133 | ] 134 | }, 135 | "text" : { 136 | "status" : "generated", 137 | "div" : "

Generated Narrative

name: Centers for Disease Control, Ministry of Health and Welfare 衛生福利部疾病管制署

address: TW

" 138 | }, 139 | "name" : "Centers for Disease Control, Ministry of Health and Welfare 衛生福利部疾病管制署", 140 | "address" : [ 141 | { 142 | "country" : "TW" 143 | } 144 | ] 145 | } 146 | }, 147 | { 148 | "fullUrl" : "urn:uuid:c220e36c-eb67-4fc4-9ba1-2fabc52acec4", 149 | "resource" : { 150 | "resourceType" : "Immunization", 151 | "id" : "Inline-Immunization-example", 152 | "meta" : { 153 | "profile" : [ 154 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Immunization-dccvs" 155 | ] 156 | }, 157 | "text" : { 158 | "status" : "generated", 159 | "div" : "

Generated Narrative

status: completed

vaccineCode: covid-19 vaccines

patient: See above (Patient/Inline-Patient-example)

occurrence: 2021-05-14

location: See above (Location/Inline-Location-example)

manufacturer: See above (Organization/Inline-Organization-VaccineManufacturer-example)

lotNumber: CTMAV509

Performers

-Actor
*See above (Practitioner/Inline-Practitioner-example)

ProtocolApplieds

-TargetDiseaseDoseNumber[x]SeriesDoses[x]
*COVID-1912
" 160 | }, 161 | "status" : "completed", 162 | "vaccineCode" : { 163 | "coding" : [ 164 | { 165 | "system" : "http://hitstdio.ntunhs.edu.tw/fhir/CodeSystem/atc-vaccines-covid-19", 166 | "code" : "J07BX03", 167 | "display" : "covid-19 vaccines" 168 | }, 169 | { 170 | "system" : "http://hitstdio.ntunhs.edu.tw/fhir/CodeSystem/vaccines-covid-19-names", 171 | "code" : "EU/1/21/1529", 172 | "display" : "Vaxzevria" 173 | } 174 | ] 175 | }, 176 | "patient" : { 177 | "reference" : "urn:uuid:2b90dd2b-2dab-4c75-9bb9-a365e07401e9" 178 | }, 179 | "occurrenceDateTime" : "2021-05-14", 180 | "location" : { 181 | "reference" : "urn:uuid:15d9e5d7-4c89-4a63-a523-efc4c442acfd" 182 | }, 183 | "manufacturer" : { 184 | "reference" : "urn:uuid:29941281-a45a-4309-84b4-784a27fdc998" 185 | }, 186 | "lotNumber" : "CTMAV509", 187 | "performer" : [ 188 | { 189 | "actor" : { 190 | "reference" : "urn:uuid:d633060f-4865-45cf-9e98-44c90ef1788b" 191 | } 192 | } 193 | ], 194 | "protocolApplied" : [ 195 | { 196 | "targetDisease" : [ 197 | { 198 | "coding" : [ 199 | { 200 | "system" : "http://snomed.info/sct", 201 | "code" : "840539006", 202 | "display" : "COVID-19" 203 | } 204 | ] 205 | } 206 | ], 207 | "doseNumberPositiveInt" : 1, 208 | "seriesDosesPositiveInt" : 2 209 | } 210 | ] 211 | } 212 | }, 213 | { 214 | "fullUrl" : "urn:uuid:15d9e5d7-4c89-4a63-a523-efc4c442acfd", 215 | "resource" : { 216 | "resourceType" : "Location", 217 | "id" : "Inline-Location-example", 218 | "meta" : { 219 | "profile" : [ 220 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Location-dccvs" 221 | ] 222 | }, 223 | "text" : { 224 | "status" : "generated", 225 | "div" : "

Generated Narrative

address: TW

" 226 | }, 227 | "address" : { 228 | "country" : "TW" 229 | } 230 | } 231 | }, 232 | { 233 | "fullUrl" : "urn:uuid:15d9e5d7-4c89-4a63-a723-efc4c442acfd", 234 | "resource" : { 235 | "resourceType" : "Organization", 236 | "id" : "Inline-Organization-hos-example", 237 | "meta" : { 238 | "profile" : [ 239 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dcc" 240 | ] 241 | }, 242 | "text" : { 243 | "status" : "generated", 244 | "div" : "

Generated Narrative

identifier: id: 401180014

name: National Taiwan University Hospital 國立臺灣大學醫學院附設醫院

" 245 | }, 246 | "identifier" : [ 247 | { 248 | "system" : "http://www.nhi.gov.tw", 249 | "value" : "401180014" 250 | } 251 | ], 252 | "name" : "National Taiwan University Hospital 國立臺灣大學醫學院附設醫院" 253 | } 254 | }, 255 | { 256 | "fullUrl" : "urn:uuid:29941281-a45a-4309-84b4-784a27fdc998", 257 | "resource" : { 258 | "resourceType" : "Organization", 259 | "id" : "Inline-Organization-VaccineManufacturer-example", 260 | "meta" : { 261 | "profile" : [ 262 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dccvs-manf" 263 | ] 264 | }, 265 | "text" : { 266 | "status" : "generated", 267 | "div" : "

Generated Narrative

identifier: id: ORG-100001699

name: AstraZeneca AB

" 268 | }, 269 | "identifier" : [ 270 | { 271 | "system" : "https://spor.ema.europa.eu/v1/organisations", 272 | "value" : "ORG-100001699" 273 | } 274 | ], 275 | "name" : "AstraZeneca AB" 276 | } 277 | }, 278 | { 279 | "fullUrl" : "urn:uuid:d633060f-4865-45cf-9e98-44c90ef1788b", 280 | "resource" : { 281 | "resourceType" : "Practitioner", 282 | "id" : "Inline-Practitioner-example", 283 | "text" : { 284 | "status" : "generated", 285 | "div" : "

Generated Narrative

identifier: id: 20021

name: LULU WANG

" 286 | }, 287 | "identifier" : [ 288 | { 289 | "value" : "20021" 290 | } 291 | ], 292 | "name" : [ 293 | { 294 | "family" : "WANG", 295 | "given" : [ 296 | "LULU" 297 | ], 298 | "prefix" : [ 299 | "Dr." 300 | ] 301 | } 302 | ] 303 | } 304 | }, 305 | { 306 | "fullUrl" : "urn:uuid:35d1734d-6ae1-405c-84c3-7d03c539b74f", 307 | "resource" : { 308 | "resourceType" : "Organization", 309 | "id" : "Inline-Organization-mohw-example", 310 | "meta" : { 311 | "profile" : [ 312 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dcc" 313 | ] 314 | }, 315 | "text" : { 316 | "status" : "generated", 317 | "div" : "

Generated Narrative

name: Taiwan Ministry of Health and Welfare 衛生福利部

address: TW

" 318 | }, 319 | "name" : "Taiwan Ministry of Health and Welfare 衛生福利部", 320 | "address" : [ 321 | { 322 | "country" : "TW" 323 | } 324 | ] 325 | } 326 | } 327 | ], 328 | "signature" : { 329 | "type" : [ 330 | { 331 | "system" : "urn:iso-astm:E1762-95:2013", 332 | "code" : "1.2.840.10065.1.12.1.6", 333 | "display" : "Validation Signature" 334 | } 335 | ], 336 | "when" : "2021-05-14T14:30:00+01:00", 337 | "who" : { 338 | "reference" : "urn:uuid:45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd3" 339 | }, 340 | "data" : "JbuZIFILUSYF+aYl8kjqjbsk/cZg6rTDexO+RtamBIOUG+742R1LXTraOB63/mb2EzixN1+MyodFp1hLYzOgsg==" 341 | } 342 | } -------------------------------------------------------------------------------- /samples/connectathon_samples/TW_Li-Hui_Lee_01-modified.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Bundle", 3 | "id" : "bun-example-tw-1", 4 | "meta" : { 5 | "profile" : [ 6 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Bundle-dccvs" 7 | ] 8 | }, 9 | "identifier" : { 10 | "system" : "https://www.cdc.gov.tw/", 11 | "value" : "URN:UVCI:01:TW:10807843F94AEE0EE5093FBC254BD813#B", 12 | "period" : { 13 | "start" : "2021-05-14", 14 | "end" : "2021-05-28" 15 | } 16 | }, 17 | "type" : "document", 18 | "timestamp" : "2021-05-14T14:30:00+01:00", 19 | "entry" : [ 20 | { 21 | "fullUrl" : "urn:uuid:30551ce1-5a28-4356-b684-1e639095ad5d", 22 | "resource" : { 23 | "resourceType" : "Composition", 24 | "id" : "Inline-Composition-example", 25 | "meta" : { 26 | "profile" : [ 27 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Composition-dccvs" 28 | ] 29 | }, 30 | "text" : { 31 | "status" : "generated", 32 | "div" : "

Generated Narrative

identifier: id: URN:UVCI:01:TW:10807843F94AEE0EE5093FBC254BD813#B

status: final

type: Immunization summary report

date: May 14, 2021, 6:30:00 AM

author: See above (Organization/Inline-Organization-hos-example)

title: TWDCC-Vaccination Status 臺灣COVID疫苗接種數位證明

Attesters

-ModeParty
*officialSee above (Organization/Inline-Organization-CDC-example)
" 33 | }, 34 | "identifier" : { 35 | "system" : "https://www.cdc.gov.tw/", 36 | "value" : "URN:UVCI:01:TW:10807843F94AEE0EE5093FBC254BD813#B" 37 | }, 38 | "status" : "final", 39 | "type" : { 40 | "coding" : [ 41 | { 42 | "system" : "http://loinc.org", 43 | "code" : "82593-5", 44 | "display" : "Immunization summary report" 45 | } 46 | ] 47 | }, 48 | "subject" : { 49 | "reference" : "urn:uuid:2b90dd2b-2dab-4c75-9bb9-a365e07401e9" 50 | }, 51 | "date" : "2021-05-14T14:30:00+08:00", 52 | "author" : [ 53 | { 54 | "reference" : "urn:uuid:15d9e5d7-4c89-4a63-a723-efc4c442acfd" 55 | } 56 | ], 57 | "title" : "TWDCC-Vaccination Status 臺灣COVID疫苗接種數位證明", 58 | "attester" : [ 59 | { 60 | "mode" : "official", 61 | "party" : { 62 | "reference" : "urn:uuid:45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd3" 63 | } 64 | } 65 | ], 66 | "section" : [ 67 | { 68 | "title" : "History of immunization Narrative", 69 | "code" : { 70 | "coding" : [ 71 | { 72 | "system" : "http://loinc.org", 73 | "code" : "11369-6", 74 | "display" : "History of immunization Narrative" 75 | } 76 | ] 77 | }, 78 | "text" : { 79 | "status" : "extensions", 80 | "div" : "

History of immunization Narrative

Vaccine marketing authorizati on holder or Vaccine manufacturer: AstraZeneca AB

Vaccine medicinal product: Vaxzevria

status: completed

vaccineCode: covid-19 vaccines

patient: Patient/pat-example-tw-1

occurrence: 2021-05-14

location: Location/loc-example-tw-1

lotNumber: CTMAV509

performer: Practitioner/pra-example-tw-1

ProtocolApplieds

-TargetDiseaseDoseNumber[x]SeriesDoses[x]
*COVID-1912
" 81 | }, 82 | "entry" : [ 83 | { 84 | "reference" : "urn:uuid:c220e36c-eb67-4fc4-9ba1-2fabc52acec4" 85 | } 86 | ] 87 | } 88 | ] 89 | } 90 | }, 91 | { 92 | "fullUrl" : "urn:uuid:2b90dd2b-2dab-4c75-9bb9-a365e07401e9", 93 | "resource" : { 94 | "resourceType" : "Patient", 95 | "id" : "Inline-Patient-example", 96 | "meta" : { 97 | "profile" : [ 98 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Patient-dcc" 99 | ] 100 | }, 101 | "text" : { 102 | "status" : "generated", 103 | "div" : "

Generated Narrative

identifier: id: 310942728

name: 王大明(OFFICIAL)

gender: male

birthDate: 1990-01-01

" 104 | }, 105 | "identifier" : [ 106 | { 107 | "system" : "http://www.boca.gov.tw/", 108 | "value" : "310942728" 109 | } 110 | ], 111 | "name" : [ 112 | { 113 | "use" : "official", 114 | "text" : "王大明", 115 | "family" : "WANG", 116 | "given" : [ 117 | "DAMING" 118 | ] 119 | } 120 | ], 121 | "gender" : "male", 122 | "birthDate" : "1990-01-01" 123 | } 124 | }, 125 | { 126 | "fullUrl" : "urn:uuid:45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd3", 127 | "resource" : { 128 | "resourceType" : "Organization", 129 | "id" : "Inline-Organization-CDC-example", 130 | "meta" : { 131 | "profile" : [ 132 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dcc" 133 | ] 134 | }, 135 | "text" : { 136 | "status" : "generated", 137 | "div" : "

Generated Narrative

name: Centers for Disease Control, Ministry of Health and Welfare 衛生福利部疾病管制署

address: TW

" 138 | }, 139 | "name" : "Centers for Disease Control, Ministry of Health and Welfare 衛生福利部疾病管制署", 140 | "address" : [ 141 | { 142 | "country" : "TW" 143 | } 144 | ] 145 | } 146 | }, 147 | { 148 | "fullUrl" : "urn:uuid:c220e36c-eb67-4fc4-9ba1-2fabc52acec4", 149 | "resource" : { 150 | "resourceType" : "Immunization", 151 | "id" : "Inline-Immunization-example", 152 | "meta" : { 153 | "profile" : [ 154 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Immunization-dccvs" 155 | ] 156 | }, 157 | "text" : { 158 | "status" : "generated", 159 | "div" : "

Generated Narrative

status: completed

vaccineCode: covid-19 vaccines

patient: See above (Patient/Inline-Patient-example)

occurrence: 2021-05-14

location: See above (Location/Inline-Location-example)

manufacturer: See above (Organization/Inline-Organization-VaccineManufacturer-example)

lotNumber: CTMAV509

Performers

-Actor
*See above (Practitioner/Inline-Practitioner-example)

ProtocolApplieds

-TargetDiseaseDoseNumber[x]SeriesDoses[x]
*COVID-1912
" 160 | }, 161 | "status" : "completed", 162 | "vaccineCode" : { 163 | "coding" : [ 164 | { 165 | "system" : "http://hitstdio.ntunhs.edu.tw/fhir/CodeSystem/atc-vaccines-covid-19", 166 | "code" : "J07BX03", 167 | "display" : "covid-19 vaccines" 168 | }, 169 | { 170 | "system" : "http://hitstdio.ntunhs.edu.tw/fhir/CodeSystem/vaccines-covid-19-names", 171 | "code" : "EU/1/21/1529", 172 | "display" : "Vaxzevria" 173 | } 174 | ] 175 | }, 176 | "patient" : { 177 | "reference" : "urn:uuid:2b90dd2b-2dab-4c75-9bb9-a365e07401e9" 178 | }, 179 | "occurrenceDateTime" : "2021-05-14", 180 | "location" : { 181 | "reference" : "urn:uuid:15d9e5d7-4c89-4a63-a523-efc4c442acfd" 182 | }, 183 | "manufacturer" : { 184 | "reference" : "urn:uuid:29941281-a45a-4309-84b4-784a27fdc998" 185 | }, 186 | "lotNumber" : "CTMAV509", 187 | "performer" : [ 188 | { 189 | "actor" : { 190 | "reference" : "urn:uuid:d633060f-4865-45cf-9e98-44c90ef1788b" 191 | } 192 | } 193 | ], 194 | "protocolApplied" : [ 195 | { 196 | "targetDisease" : [ 197 | { 198 | "coding" : [ 199 | { 200 | "system" : "http://snomed.info/sct", 201 | "code" : "840539006", 202 | "display" : "COVID-19" 203 | } 204 | ] 205 | } 206 | ], 207 | "doseNumberPositiveInt" : 1, 208 | "seriesDosesPositiveInt" : 2 209 | } 210 | ] 211 | } 212 | }, 213 | { 214 | "fullUrl" : "urn:uuid:15d9e5d7-4c89-4a63-a523-efc4c442acfd", 215 | "resource" : { 216 | "resourceType" : "Location", 217 | "id" : "Inline-Location-example", 218 | "meta" : { 219 | "profile" : [ 220 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Location-dccvs" 221 | ] 222 | }, 223 | "text" : { 224 | "status" : "generated", 225 | "div" : "

Generated Narrative

address: TW

" 226 | }, 227 | "address" : { 228 | "country" : "TW" 229 | } 230 | } 231 | }, 232 | { 233 | "fullUrl" : "urn:uuid:15d9e5d7-4c89-4a63-a723-efc4c442acfd", 234 | "resource" : { 235 | "resourceType" : "Organization", 236 | "id" : "Inline-Organization-hos-example", 237 | "meta" : { 238 | "profile" : [ 239 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dcc" 240 | ] 241 | }, 242 | "text" : { 243 | "status" : "generated", 244 | "div" : "

Generated Narrative

identifier: id: 401180014

name: National Taiwan University Hospital 國立臺灣大學醫學院附設醫院

" 245 | }, 246 | "identifier" : [ 247 | { 248 | "system" : "http://www.nhi.gov.tw", 249 | "value" : "401180014" 250 | } 251 | ], 252 | "name" : "National Taiwan University Hospital 國立臺灣大學醫學院附設醫院" 253 | } 254 | }, 255 | { 256 | "fullUrl" : "urn:uuid:29941281-a45a-4309-84b4-784a27fdc998", 257 | "resource" : { 258 | "resourceType" : "Organization", 259 | "id" : "Inline-Organization-VaccineManufacturer-example", 260 | "meta" : { 261 | "profile" : [ 262 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dccvs-manf" 263 | ] 264 | }, 265 | "text" : { 266 | "status" : "generated", 267 | "div" : "

Generated Narrative

identifier: id: ORG-100001699

name: AstraZeneca AB

" 268 | }, 269 | "identifier" : [ 270 | { 271 | "system" : "https://spor.ema.europa.eu/v1/organisations", 272 | "value" : "ORG-100001699" 273 | } 274 | ], 275 | "name" : "AstraZeneca AB" 276 | } 277 | }, 278 | { 279 | "fullUrl" : "urn:uuid:d633060f-4865-45cf-9e98-44c90ef1788b", 280 | "resource" : { 281 | "resourceType" : "Practitioner", 282 | "id" : "Inline-Practitioner-example", 283 | "text" : { 284 | "status" : "generated", 285 | "div" : "

Generated Narrative

identifier: id: 20021

name: LULU WANG

" 286 | }, 287 | "identifier" : [ 288 | { 289 | "value" : "20021" 290 | } 291 | ], 292 | "name" : [ 293 | { 294 | "family" : "WANG", 295 | "given" : [ 296 | "LULU" 297 | ], 298 | "prefix" : [ 299 | "Dr." 300 | ] 301 | } 302 | ] 303 | } 304 | }, 305 | { 306 | "fullUrl" : "urn:uuid:35d1734d-6ae1-405c-84c3-7d03c539b74f", 307 | "resource" : { 308 | "resourceType" : "Organization", 309 | "id" : "Inline-Organization-mohw-example", 310 | "meta" : { 311 | "profile" : [ 312 | "http://hitstdio.ntunhs.edu.tw/fhir/StructureDefinition/Organization-dcc" 313 | ] 314 | }, 315 | "text" : { 316 | "status" : "generated", 317 | "div" : "

Generated Narrative

name: Taiwan Ministry of Health and Welfare 衛生福利部

address: TW

" 318 | }, 319 | "name" : "Taiwan Ministry of Health and Welfare 衛生福利部", 320 | "address" : [ 321 | { 322 | "country" : "TW" 323 | } 324 | ] 325 | } 326 | } 327 | ], 328 | "signature" : { 329 | "type" : [ 330 | { 331 | "system" : "urn:iso-astm:E1762-95:2013", 332 | "code" : "1.2.840.10065.1.12.1.6", 333 | "display" : "Validation Signature" 334 | } 335 | ], 336 | "when" : "2021-05-14T14:30:00+01:00", 337 | "who" : { 338 | "reference" : "urn:uuid:45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd3" 339 | }, 340 | "data" : "JbuZIFILUSYF+aYl8kjqjbsk/cZg6rTDexO+RtamBIOUG+742R1LXTraOB63/mb2EzixN1+MyodFp1hLYzOgsg==" 341 | } 342 | } -------------------------------------------------------------------------------- /samples/connectathon_archive/HK_IPS_Sample1.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Bundle", 3 | "id": "IPS-HKG-sample-Bundle-01", 4 | "language": "en-US", 5 | "identifier": { 6 | "system": "https://www.ehealth.gov.hk/bundle", 7 | "value": "sample-ips-1" 8 | }, 9 | "type": "document", 10 | "timestamp": "2022-01-07T17:59:47.953Z", 11 | "entry": [ 12 | { 13 | "fullUrl": "https://www.ehealth.gov.hk/Composition/IPS-Composition-01", 14 | "resource": { 15 | "resourceType": "Composition", 16 | "id": "IPS-Composition-01", 17 | "subject": { 18 | "reference": "https://www.ehealth.gov.hk/Patient/00001" 19 | }, 20 | "language": "en-US", 21 | "text": { 22 | "status": "generated", 23 | "div": "
International Patient Summary
" 24 | }, 25 | "status": "final", 26 | "type": { 27 | "coding": [ 28 | { 29 | "system": "http://loinc.org", 30 | "code": "60591-5", 31 | "display": "Patient summary Document" 32 | } 33 | ] 34 | }, 35 | "date": "2022-01-07T17:59:47.953Z", 36 | "author": [ 37 | { 38 | "reference": "Organization/HKG-EHR" 39 | } 40 | ], 41 | "title": "International Patient Summary", 42 | "section": [ 43 | { 44 | "title": "Allergies and Intolerances", 45 | "code": { 46 | "coding": [ 47 | { 48 | "system": "http://loinc.org", 49 | "code": "48765-2", 50 | "display": "Allergies and adverse reactions Document" 51 | } 52 | ] 53 | }, 54 | "text": { 55 | "status": "generated", 56 | "div": "
  • Allergy Name: Cephalosporins
    Verification Status: Confirmed
    Reaction: Rash
  • Allergy Name: Seafood
    Verification Status: Unconfirmed
" 57 | }, 58 | "entry": [ 59 | { 60 | "reference": "AllergyIntolerance/AllergyIntolerance-00001" 61 | }, 62 | { 63 | "reference": "AllergyIntolerance/AllergyIntolerance-00002" 64 | } 65 | ] 66 | }, 67 | { 68 | "title": "Problem List", 69 | "code": { 70 | "coding": [ 71 | { 72 | "system": "http://loinc.org", 73 | "code": "11450-4", 74 | "display": "Problem list - Reported" 75 | } 76 | ] 77 | }, 78 | "text": { 79 | "status": "generated", 80 | "div": "
  • Condition Name: Hyperlipidemia
    Code: 55822004
    Status: Active
" 81 | }, 82 | "entry": [ 83 | { 84 | "reference": "Condition/Problem-00001" 85 | } 86 | ] 87 | }, 88 | { 89 | "title": "Medication Summary", 90 | "code": { 91 | "coding": [ 92 | { 93 | "system": "http://loinc.org", 94 | "code": "10160-0", 95 | "display": "History of Medication use Narrative" 96 | } 97 | ] 98 | }, 99 | "text": { 100 | "status": "generated", 101 | "div": "
  • Medication Name: No known medications
    Code: No information available
    Status: Active
" 102 | }, 103 | "emptyReason": { 104 | "coding" : [{ 105 | "system" : "http://terminology.hl7.org/CodeSystem/list-empty-reason", 106 | "code" : "unavailable", 107 | "display" : "Unavailable" 108 | }], 109 | "text" : "No information available" 110 | } 111 | } 112 | ] 113 | } 114 | }, 115 | { 116 | "fullUrl": "https://www.ehealth.gov.hk/Patient/00001", 117 | "resource": { 118 | "resourceType": "Patient", 119 | "id": "00001", 120 | "meta": { 121 | "versionId": "00001", 122 | "profile": [ 123 | "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" 124 | ] 125 | }, 126 | "language": "en-US", 127 | "text": { 128 | "status": "generated", 129 | "div": "
Patient Name: : PATIENT, PEACH
Sex: Male
BirthDate: 1951-01-01
" 130 | }, 131 | "identifier": [ 132 | { 133 | "use": "official", 134 | "value": "U6547890" 135 | } 136 | ], 137 | "name": [ 138 | { 139 | "use": "usual", 140 | "text": "PATIENT, PEACH", 141 | "family": "PATIENT", 142 | "given": [ 143 | "PEACH" 144 | ] 145 | } 146 | ], 147 | "gender": "male", 148 | "birthDate": "1951-01-01" 149 | } 150 | }, 151 | { 152 | "fullUrl": "https://www.ehealth.gov.hk/Organization/HKG-EHR", 153 | "resource": { 154 | "resourceType": "Organization", 155 | "id": "HKG-EHR", 156 | "meta": { 157 | "versionId": "00001", 158 | "profile": [ 159 | "http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips" 160 | ] 161 | }, 162 | "text": { 163 | "status": "generated", 164 | "div": "
Organization Name: Electronic Health Record Sharing System
" 165 | }, 166 | "active": true, 167 | "name": "Electronic Health Record Sharing System", 168 | "telecom": [ 169 | { 170 | "system": "phone", 171 | "value": "3467-6300", 172 | "use": "work" 173 | } 174 | ], 175 | "address": [ 176 | { 177 | "use": "work", 178 | "type": "both", 179 | "line": [ 180 | "Unit 1193, 11/F, Kowloonbay International Trade & Exhibition Centre" 181 | ], 182 | "country": "Hong Kong" 183 | } 184 | ] 185 | } 186 | }, 187 | { 188 | "fullUrl": "https://www.ehealth.gov.hk/AllergyIntolerance/AllergyIntolerance-00001", 189 | "resource": { 190 | "resourceType": "AllergyIntolerance", 191 | "id": "AllergyIntolerance-00001", 192 | "meta": { 193 | "versionId": "00001", 194 | "lastUpdated": "2022-01-07T17:59:47.953Z", 195 | "profile": [ 196 | "http://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips" 197 | ] 198 | }, 199 | "type": "allergy", 200 | "patient": { 201 | "reference": "https://www.ehealth.gov.hk/Patient/00001", 202 | "display": "PATIENT, PEACH" 203 | }, 204 | "clinicalStatus": { 205 | "coding": [ 206 | { 207 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 208 | "code": "active" 209 | } 210 | ], 211 | "text": "active" 212 | }, 213 | "verificationStatus": { 214 | "coding": [ 215 | { 216 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", 217 | "code": "confirmed", 218 | "display": "Confirmed" 219 | } 220 | ], 221 | "text": "confirmed" 222 | }, 223 | "category": [ 224 | "medication" 225 | ], 226 | "code": { 227 | "coding": [ 228 | { 229 | "system": "https://www.ehealth.gov.hk/Allergy/allergenCode", 230 | "code": "-", 231 | "display": "cephalosporins" 232 | } 233 | ], 234 | "text": "cephalosporins" 235 | }, 236 | "reaction": [ 237 | { 238 | "manifestation": [ 239 | { 240 | "coding": [ 241 | { 242 | "system": "http://snomed.info/sct", 243 | "code": "271807003", 244 | "display": "Rash" 245 | } 246 | ], 247 | "text": "Rash" 248 | } 249 | ] 250 | } 251 | ] 252 | } 253 | }, 254 | { 255 | "fullUrl": "https://www.ehealth.gov.hk/AllergyIntolerance/AllergyIntolerance-00002", 256 | "resource": { 257 | "resourceType": "AllergyIntolerance", 258 | "id": "AllergyIntolerance-00002", 259 | "meta": { 260 | "versionId": "00001", 261 | "lastUpdated": "2022-01-07T17:59:47.953Z", 262 | "profile": [ 263 | "http://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips" 264 | ] 265 | }, 266 | "type": "allergy", 267 | "patient": { 268 | "reference": "https://www.ehealth.gov.hk/Patient/00001", 269 | "display": "PATIENT, PEACH" 270 | }, 271 | "clinicalStatus": { 272 | "coding": [ 273 | { 274 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 275 | "code": "active" 276 | } 277 | ], 278 | "text": "active" 279 | }, 280 | "verificationStatus": { 281 | "coding": [ 282 | { 283 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", 284 | "code": "unconfirmed", 285 | "display": "Unconfirmed" 286 | } 287 | ], 288 | "text": "unconfirmed" 289 | }, 290 | "category": [ 291 | "food" 292 | ], 293 | "code": { 294 | "coding": [ 295 | { 296 | "system": "https://www.ehealth.gov.hk/Allergy/allergenCode", 297 | "code": "-", 298 | "display": "Seafood" 299 | } 300 | ], 301 | "text": "Seafood" 302 | } 303 | } 304 | }, 305 | { 306 | "fullUrl": "https://www.ehealth.gov.hk/Condition/Problem-00001", 307 | "resource": { 308 | "resourceType": "Condition", 309 | "id": "Problem-00001", 310 | "meta": { 311 | "versionId": "00001" 312 | }, 313 | "clinicalStatus": { 314 | "coding": [ 315 | { 316 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 317 | "code": "active", 318 | "display": "active" 319 | } 320 | ], 321 | "text": "active" 322 | }, 323 | "category": [ 324 | { 325 | "coding": [ 326 | { 327 | "system": "http://terminology.hl7.org/CodeSystem/condition-category", 328 | "code": "problem-list-item", 329 | "display": "Problem List Item" 330 | }, 331 | { 332 | "system": "http://loinc.org", 333 | "code": "75326-9", 334 | "display": "Problem" 335 | } 336 | ] 337 | } 338 | ], 339 | "code": { 340 | "coding": [ 341 | { 342 | "system": "http://snomed.info/sct", 343 | "code": "55822004", 344 | "display": "Hyperlipidemia" 345 | } 346 | ], 347 | "text": "Hyperlipidemia" 348 | }, 349 | "subject": { 350 | "reference": "https://www.ehealth.gov.hk/Patient/00001", 351 | "display": "PATIENT, PEACH" 352 | } 353 | } 354 | } 355 | ] 356 | } -------------------------------------------------------------------------------- /samples/connectathon_samples/HK_IPS_Sample1.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Bundle", 3 | "id": "IPS-HKG-sample-Bundle-01", 4 | "language": "en-US", 5 | "identifier": { 6 | "system": "https://www.ehealth.gov.hk/bundle", 7 | "value": "sample-ips-1" 8 | }, 9 | "type": "document", 10 | "timestamp": "2022-01-07T17:59:47.953Z", 11 | "entry": [ 12 | { 13 | "fullUrl": "https://www.ehealth.gov.hk/Composition/IPS-Composition-01", 14 | "resource": { 15 | "resourceType": "Composition", 16 | "id": "IPS-Composition-01", 17 | "subject": { 18 | "reference": "https://www.ehealth.gov.hk/Patient/00001" 19 | }, 20 | "language": "en-US", 21 | "text": { 22 | "status": "generated", 23 | "div": "
International Patient Summary
" 24 | }, 25 | "status": "final", 26 | "type": { 27 | "coding": [ 28 | { 29 | "system": "http://loinc.org", 30 | "code": "60591-5", 31 | "display": "Patient summary Document" 32 | } 33 | ] 34 | }, 35 | "date": "2022-01-07T17:59:47.953Z", 36 | "author": [ 37 | { 38 | "reference": "Organization/HKG-EHR" 39 | } 40 | ], 41 | "title": "International Patient Summary", 42 | "section": [ 43 | { 44 | "title": "Allergies and Intolerances", 45 | "code": { 46 | "coding": [ 47 | { 48 | "system": "http://loinc.org", 49 | "code": "48765-2", 50 | "display": "Allergies and adverse reactions Document" 51 | } 52 | ] 53 | }, 54 | "text": { 55 | "status": "generated", 56 | "div": "
  • Allergy Name: Cephalosporins
    Verification Status: Confirmed
    Reaction: Rash
  • Allergy Name: Seafood
    Verification Status: Unconfirmed
" 57 | }, 58 | "entry": [ 59 | { 60 | "reference": "AllergyIntolerance/AllergyIntolerance-00001" 61 | }, 62 | { 63 | "reference": "AllergyIntolerance/AllergyIntolerance-00002" 64 | } 65 | ] 66 | }, 67 | { 68 | "title": "Problem List", 69 | "code": { 70 | "coding": [ 71 | { 72 | "system": "http://loinc.org", 73 | "code": "11450-4", 74 | "display": "Problem list - Reported" 75 | } 76 | ] 77 | }, 78 | "text": { 79 | "status": "generated", 80 | "div": "
  • Condition Name: Hyperlipidemia
    Code: 55822004
    Status: Active
" 81 | }, 82 | "entry": [ 83 | { 84 | "reference": "Condition/Problem-00001" 85 | } 86 | ] 87 | }, 88 | { 89 | "title": "Medication Summary", 90 | "code": { 91 | "coding": [ 92 | { 93 | "system": "http://loinc.org", 94 | "code": "10160-0", 95 | "display": "History of Medication use Narrative" 96 | } 97 | ] 98 | }, 99 | "text": { 100 | "status": "generated", 101 | "div": "
  • Medication Name: No known medications
    Code: No information available
    Status: Active
" 102 | }, 103 | "emptyReason": { 104 | "coding" : [{ 105 | "system" : "http://terminology.hl7.org/CodeSystem/list-empty-reason", 106 | "code" : "unavailable", 107 | "display" : "Unavailable" 108 | }], 109 | "text" : "No information available" 110 | } 111 | } 112 | ] 113 | } 114 | }, 115 | { 116 | "fullUrl": "https://www.ehealth.gov.hk/Patient/00001", 117 | "resource": { 118 | "resourceType": "Patient", 119 | "id": "00001", 120 | "meta": { 121 | "versionId": "00001", 122 | "profile": [ 123 | "http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" 124 | ] 125 | }, 126 | "language": "en-US", 127 | "text": { 128 | "status": "generated", 129 | "div": "
Patient Name: : PATIENT, PEACH
Sex: Male
BirthDate: 1951-01-01
" 130 | }, 131 | "identifier": [ 132 | { 133 | "use": "official", 134 | "value": "U6547890" 135 | } 136 | ], 137 | "name": [ 138 | { 139 | "use": "usual", 140 | "text": "PATIENT, PEACH", 141 | "family": "PATIENT", 142 | "given": [ 143 | "PEACH" 144 | ] 145 | } 146 | ], 147 | "gender": "male", 148 | "birthDate": "1951-01-01" 149 | } 150 | }, 151 | { 152 | "fullUrl": "https://www.ehealth.gov.hk/Organization/HKG-EHR", 153 | "resource": { 154 | "resourceType": "Organization", 155 | "id": "HKG-EHR", 156 | "meta": { 157 | "versionId": "00001", 158 | "profile": [ 159 | "http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips" 160 | ] 161 | }, 162 | "text": { 163 | "status": "generated", 164 | "div": "
Organization Name: Electronic Health Record Sharing System
" 165 | }, 166 | "active": true, 167 | "name": "Electronic Health Record Sharing System", 168 | "telecom": [ 169 | { 170 | "system": "phone", 171 | "value": "3467-6300", 172 | "use": "work" 173 | } 174 | ], 175 | "address": [ 176 | { 177 | "use": "work", 178 | "type": "both", 179 | "line": [ 180 | "Unit 1193, 11/F, Kowloonbay International Trade & Exhibition Centre" 181 | ], 182 | "country": "Hong Kong" 183 | } 184 | ] 185 | } 186 | }, 187 | { 188 | "fullUrl": "https://www.ehealth.gov.hk/AllergyIntolerance/AllergyIntolerance-00001", 189 | "resource": { 190 | "resourceType": "AllergyIntolerance", 191 | "id": "AllergyIntolerance-00001", 192 | "meta": { 193 | "versionId": "00001", 194 | "lastUpdated": "2022-01-07T17:59:47.953Z", 195 | "profile": [ 196 | "http://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips" 197 | ] 198 | }, 199 | "type": "allergy", 200 | "patient": { 201 | "reference": "https://www.ehealth.gov.hk/Patient/00001", 202 | "display": "PATIENT, PEACH" 203 | }, 204 | "clinicalStatus": { 205 | "coding": [ 206 | { 207 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 208 | "code": "active" 209 | } 210 | ], 211 | "text": "active" 212 | }, 213 | "verificationStatus": { 214 | "coding": [ 215 | { 216 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", 217 | "code": "confirmed", 218 | "display": "Confirmed" 219 | } 220 | ], 221 | "text": "confirmed" 222 | }, 223 | "category": [ 224 | "medication" 225 | ], 226 | "code": { 227 | "coding": [ 228 | { 229 | "system": "https://www.ehealth.gov.hk/Allergy/allergenCode", 230 | "code": "-", 231 | "display": "cephalosporins" 232 | } 233 | ], 234 | "text": "cephalosporins" 235 | }, 236 | "reaction": [ 237 | { 238 | "manifestation": [ 239 | { 240 | "coding": [ 241 | { 242 | "system": "http://snomed.info/sct", 243 | "code": "271807003", 244 | "display": "Rash" 245 | } 246 | ], 247 | "text": "Rash" 248 | } 249 | ] 250 | } 251 | ] 252 | } 253 | }, 254 | { 255 | "fullUrl": "https://www.ehealth.gov.hk/AllergyIntolerance/AllergyIntolerance-00002", 256 | "resource": { 257 | "resourceType": "AllergyIntolerance", 258 | "id": "AllergyIntolerance-00002", 259 | "meta": { 260 | "versionId": "00001", 261 | "lastUpdated": "2022-01-07T17:59:47.953Z", 262 | "profile": [ 263 | "http://hl7.org/fhir/uv/ips/StructureDefinition/AllergyIntolerance-uv-ips" 264 | ] 265 | }, 266 | "type": "allergy", 267 | "patient": { 268 | "reference": "https://www.ehealth.gov.hk/Patient/00001", 269 | "display": "PATIENT, PEACH" 270 | }, 271 | "clinicalStatus": { 272 | "coding": [ 273 | { 274 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 275 | "code": "active" 276 | } 277 | ], 278 | "text": "active" 279 | }, 280 | "verificationStatus": { 281 | "coding": [ 282 | { 283 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", 284 | "code": "unconfirmed", 285 | "display": "Unconfirmed" 286 | } 287 | ], 288 | "text": "unconfirmed" 289 | }, 290 | "category": [ 291 | "food" 292 | ], 293 | "code": { 294 | "coding": [ 295 | { 296 | "system": "https://www.ehealth.gov.hk/Allergy/allergenCode", 297 | "code": "-", 298 | "display": "Seafood" 299 | } 300 | ], 301 | "text": "Seafood" 302 | } 303 | } 304 | }, 305 | { 306 | "fullUrl": "https://www.ehealth.gov.hk/Condition/Problem-00001", 307 | "resource": { 308 | "resourceType": "Condition", 309 | "id": "Problem-00001", 310 | "meta": { 311 | "versionId": "00001" 312 | }, 313 | "clinicalStatus": { 314 | "coding": [ 315 | { 316 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 317 | "code": "active", 318 | "display": "active" 319 | } 320 | ], 321 | "text": "active" 322 | }, 323 | "category": [ 324 | { 325 | "coding": [ 326 | { 327 | "system": "http://terminology.hl7.org/CodeSystem/condition-category", 328 | "code": "problem-list-item", 329 | "display": "Problem List Item" 330 | }, 331 | { 332 | "system": "http://loinc.org", 333 | "code": "75326-9", 334 | "display": "Problem" 335 | } 336 | ] 337 | } 338 | ], 339 | "code": { 340 | "coding": [ 341 | { 342 | "system": "http://snomed.info/sct", 343 | "code": "55822004", 344 | "display": "Hyperlipidemia" 345 | } 346 | ], 347 | "text": "Hyperlipidemia" 348 | }, 349 | "subject": { 350 | "reference": "https://www.ehealth.gov.hk/Patient/00001", 351 | "display": "PATIENT, PEACH" 352 | } 353 | } 354 | } 355 | ] 356 | } --------------------------------------------------------------------------------