├── .gitignore ├── README.md ├── examples ├── package-lock.json ├── node_modules │ └── pretty-data │ │ ├── test │ │ ├── test_json.js │ │ ├── test_css.js │ │ ├── test_xml.js │ │ └── test_sql.js │ │ ├── package.json │ │ ├── README.md │ │ └── pretty-data.js ├── break_bundle_into_resources.js └── example_individual_resources │ └── IPS-bundle-01 │ ├── Organization_45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7.json │ ├── MedicationRequest-eumfh-39-07-1-request.json │ ├── Organization_890751f4-2924-4636-bab7-efffc7f3cf15.json │ ├── Practitioner_1c616b24-3895-48c4-9a02-9a64110351ef.json │ ├── Medication_976d0804-cae0-45ae-afe3-a19f3ceba6bc.json │ ├── MedicationStatement_47524493-846a-4a26-bae2-4ab03e60f02e.json │ ├── AllergyIntolerance_c7781f44-6df8-4a8b-9e06-0b34263a47c5.json │ ├── Observation_pregnancy_status.json │ ├── Observation_social_history_alcohol.json │ ├── Medication_8adc0999-9468-4ac9-9557-680fa133d626.json │ ├── Observation_social_history_smoking_status.json │ ├── MedicationStatement_c220e36c-eb67-4fc4-9ba1-2fabc52acec6.json │ ├── Observation_6e39ccf3-f997-4a2b-8f28-b4b71c778c70.json │ ├── Observation_b4916505-a06b-460c-9be8-011609282457.json │ ├── Observation_a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4.json │ ├── Observation_cc354e00-a419-47ea-8b6c-1768b2a01646.json │ ├── Observation_aa11a2be-3e36-4be7-b58a-6fc3dace2741.json │ ├── Observation_26bee0a9-5997-4557-ab9d-c6adbb05b572.json │ ├── AllergyIntolerance_72884cad-ebe6-4f43-a51a-2f978275f132.json │ ├── Observation_2639657a-c19a-48e2-82cc-471e13b8ad94.json │ ├── Patient_2b90dd2b-2dab-4c75-9bb9-a355e07401e8.json │ ├── Condition_c4597aa2-688a-401b-a658-70acc6de28c6.json │ └── Condition_c64139e7-f02d-409c-bf34-75e8bf23bc80.json ├── scripts └── loading_script │ ├── package.json │ ├── target │ ├── IPS-IG-example │ │ ├── Organization_45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7.json │ │ ├── MedicationRequest-eumfh-39-07-1-request.json │ │ ├── Organization_890751f4-2924-4636-bab7-efffc7f3cf15.json │ │ ├── Practitioner_1c616b24-3895-48c4-9a02-9a64110351ef.json │ │ ├── Medication_976d0804-cae0-45ae-afe3-a19f3ceba6bc.json │ │ ├── AllergyIntolerance_c7781f44-6df8-4a8b-9e06-0b34263a47c5.json │ │ ├── MedicationStatement_47524493-846a-4a26-bae2-4ab03e60f02e.json │ │ ├── Observation_pregnancy_status.json │ │ ├── Observation_social_history_alcohol.json │ │ ├── Medication_8adc0999-9468-4ac9-9557-680fa133d626.json │ │ ├── Observation_social_history_smoking_status.json │ │ ├── MedicationStatement_c220e36c-eb67-4fc4-9ba1-2fabc52acec6.json │ │ ├── Observation_6e39ccf3-f997-4a2b-8f28-b4b71c778c70.json │ │ ├── Observation_b4916505-a06b-460c-9be8-011609282457.json │ │ ├── Observation_a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4.json │ │ ├── Observation_cc354e00-a419-47ea-8b6c-1768b2a01646.json │ │ ├── Observation_aa11a2be-3e36-4be7-b58a-6fc3dace2741.json │ │ ├── Observation_26bee0a9-5997-4557-ab9d-c6adbb05b572.json │ │ ├── AllergyIntolerance_72884cad-ebe6-4f43-a51a-2f978275f132.json │ │ ├── Observation_2639657a-c19a-48e2-82cc-471e13b8ad94.json │ │ ├── Patient_2b90dd2b-2dab-4c75-9bb9-a355e07401e8.json │ │ ├── Condition_c4597aa2-688a-401b-a658-70acc6de28c6.json │ │ └── Condition_c64139e7-f02d-409c-bf34-75e8bf23bc80.json │ ├── IPS-no-info │ │ └── Patient_2b90dd2b-2dab-4c75-9bb9-a355e07401e8.json │ └── IPS-no-known │ │ └── IPS_IG_bundle-no-known-required-sections.json │ └── loading_script.js ├── docs ├── README.md ├── Examples_Documentation.md ├── Code_Changes_HAPI_IPS.md ├── Project_Overview.md ├── Installing_HAPI_IPS_Server.md ├── Peter_Jordan_NZ_Filtering_Rules.csv ├── Installing_Dev_Environments.md └── Summary_Creation_Steps.md ├── NOTICE.txt └── LICENSE.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directories 2 | node_modules/ 3 | scripts/node_modules 4 | scripts/loading_scripts/node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IPS Reference Server Implementation 2 | 3 | This github repository is used to support the development, testing, documentations and examples associated with a 2022 project sponsored by HL7 (Health Level Seven International) / ONC (Office of the National Coordinator for Health IT). 4 | 5 | See LICENSE.txt (APACHE-2 License) for more information on usage. -------------------------------------------------------------------------------- /examples/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "pretty-data": { 6 | "version": "0.40.0", 7 | "resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz", 8 | "integrity": "sha512-YFLnEdDEDnkt/GEhet5CYZHCvALw6+Elyb/tp8kQG03ZSIuzeaDWpZYndCXwgqu4NAjh1PI534dhDS1mHarRnQ==" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /scripts/loading_script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "loadingData", 3 | "version": "0.0.1", 4 | "description": "fhir-ips-server scripts", 5 | "main": "", 6 | "type": "module", 7 | "author": { 8 | "name": "More Informatics, Inc.", 9 | "email": "jdamore@moreinformaticss.com" 10 | }, 11 | "engines": { 12 | "node": "^14.16.1" 13 | }, 14 | "dependencies": { 15 | "chalk": "^5.0.1", 16 | "pretty-data": "^0.40.0", 17 | "request": "^2.88.2" 18 | }, 19 | "repository": { 20 | "type": "git", 21 | "url": "https://github.com/jddamore/fhir-ips-server" 22 | }, 23 | "snyk": true 24 | } 25 | -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/test/test_json.js: -------------------------------------------------------------------------------- 1 | 2 | var json = '{"menu":{"id": "file","value": \n[[1,2,3],[4,5,6] ],\n"popup":{"menuitem":[{"value": ["one","two"],\n"onclick":"CreateNewDoc()"},{"value":"Close","onclick":"CloseDoc()"}]}}}', 3 | json_pp = require('../pretty-data').pd.json(json), 4 | json_min = require('../pretty-data').pd.jsonmin(json); 5 | 6 | console.log('\n==============================================================================\n'); 7 | console.log('\n/*------- Original JSON string: -------*/\n\n' + json + '\n'); 8 | console.log('\n/*------- Beautified JSON: -------------*/\n\n' + json_pp + '\n'); 9 | console.log('\n/*------- Minified JSON: ---------------*/\n\n' + json_min + '\n'); 10 | console.log('\n===============================================================================\n'); 11 | -------------------------------------------------------------------------------- /examples/break_bundle_into_resources.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const pd = require('pretty-data').pd; 3 | 4 | let filename = 'IPS-bundle-01.json'; 5 | let file = fs.readFileSync(`./example_bundle/${filename}`, 'utf-8'); 6 | let thing = JSON.parse(file); 7 | 8 | if (!fs.existsSync(`./example_individual_resources/${filename}`)) { 9 | fs.mkdirSync(`./example_individual_resources/${filename.replace('.json', '')}`); 10 | } 11 | 12 | for (let i = 0; i < thing.entry.length; i++) { 13 | if (thing.entry[i].resource.resourceType !== 'Composition') { 14 | let name = `${thing.entry[i].resource.resourceType}_${thing.entry[i].resource.id}.json`; 15 | fs.writeFileSync(`./example_individual_resources/${filename.replace('.json', '')}/${name}`, pd.json(thing.entry[i].resource)); 16 | console.log(`${name} file written`); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | ## IPS Reference Implementation Server Documentation 2 | 3 | Check out the following files for more information on a Reference Implementation Server for the International Patient Summary (IPS): 4 | 5 | - [Project Overview](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Project_Overview.md) 6 | - [Installing HAPI IPS Reference Implementation Server](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Installing_HAPI_IPS_Server.md) 7 | - [Examples Documentation](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Examples_Documentation.md) 8 | - [Summary Creation Logic](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Summary_Creation_Steps.md) 9 | - [Installing Development Environments](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Installing_Dev_Environments.md) 10 | - [Code Changes for HAPI IPS Server](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Code_Changes_HAPI_IPS.md) 11 | -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/test/test_css.js: -------------------------------------------------------------------------------- 1 | 2 | var css = '.headbg{margin:0 8px;display:none; }a:link,a:focus{ color:#00c }\n /* comment */ a:active{ color:red }', 3 | pp_css = require('../pretty-data').pd.css(css), 4 | pp_cssmin_com = require('../pretty-data').pd.cssmin(css,true), 5 | pp_cssmin = require('../pretty-data').pd.cssmin(css); 6 | 7 | console.log('\n==============================================================================\n'); 8 | console.log('\n/*------- Original CSS string: -------*/\n\n' + css + '\n'); 9 | console.log('\n/*------- Beautified original CSS -------------*/\n\n' + pp_css + '\n'); 10 | console.log('\n/*------- Minified original CSS with preserved comments: -------*/\n\n' + pp_cssmin_com + '\n'); 11 | console.log('\n/*------- Minified original CSS with deleted comments: ---------*/\n\n' + pp_cssmin + '\n'); 12 | console.log('\n===============================================================================\n'); 13 | -------------------------------------------------------------------------------- /NOTICE.txt: -------------------------------------------------------------------------------- 1 | This work is based on HAPI FHIR server code and includes additions 2 | for the support of the FHIR International Patient Summary. 3 | 4 | Base HAPI FHIR server: https://github.com/hapifhir/hapi-fhir 5 | International Patient Summary: http://build.fhir.org/ig/HL7/fhir-ips/ 6 | https://international-patient-summary.net/ 7 | 8 | More information on Fast Healthcare Interoperability Resource (FHIR) 9 | https://hl7.org/FHIR/ 10 | 11 | PRIOR NOTICE FROM HAPI FHIR SERVER 12 | 13 | Copyright 2015, University Health Network 14 | Licensed under the Apache License, Version 2.0 (the "License"); 15 | you may not use this work except in compliance with the License. 16 | You may obtain a copy of the License at 17 | 18 | http://www.apache.org/licenses/LICENSE-2.0 19 | 20 | Unless required by applicable law or agreed to in writing, software 21 | distributed under the License is distributed on an "AS IS" BASIS, 22 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 | See the License for the specific language governing permissions and 24 | limitations under the License. -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/test/test_xml.js: -------------------------------------------------------------------------------- 1 | 2 | var xml = ' bbb ]]>', 3 | pp_xml = require('../pretty-data').pd.xml(xml), 4 | pp_xmlmin_com = require('../pretty-data').pd.xmlmin(xml,true), 5 | pp_xmlmin = require('../pretty-data').pd.xmlmin(xml); 6 | 7 | console.log('\n==============================================================================\n'); 8 | console.log('\n/*------- Original XML string: -------*/\n\n' + xml + '\n'); 9 | console.log('\n/*------- Beautified XML -------------*/\n\n' + pp_xml + '\n'); 10 | console.log('\n/*------- Minified XML with preserved comments: -------*/\n\n' + pp_xmlmin_com + '\n'); 11 | console.log('\n/*------- Minified XML with deleted comments: ---------*/\n\n' + pp_xmlmin + '\n'); 12 | console.log('\n===============================================================================\n'); 13 | -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Organization_45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Organization", 3 | "id": "45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7\"

active: true

type: Other (Organization type#other)

name: Laboratoire de charme

" 7 | }, 8 | "active": true, 9 | "type": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/organization-type", 14 | "code": "other" 15 | } 16 | ] 17 | } 18 | ], 19 | "name": "Laboratoire de charme" 20 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Organization_45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Organization", 3 | "id": "45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7\"

active: true

type: Other (Organization type#other)

name: Laboratoire de charme

" 7 | }, 8 | "active": true, 9 | "type": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/organization-type", 14 | "code": "other" 15 | } 16 | ] 17 | } 18 | ], 19 | "name": "Laboratoire de charme" 20 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/MedicationRequest-eumfh-39-07-1-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "MedicationRequest", 3 | "id": "eumfh-39-07-1-request", 4 | "status": "active", 5 | "intent": "order", 6 | "medicationCodeableConcept": { 7 | "coding": [ 8 | { 9 | "system": "http://www.nlm.nih.gov/research/umls/rxnorm", 10 | "code": "617311", 11 | "display": "atorvastatin 40mg Oral Tablet" 12 | } 13 | ] 14 | }, 15 | "subject": { 16 | "reference": "Patient/1" 17 | }, 18 | "dosageInstruction": [ 19 | { 20 | "text": "40 mg/day", 21 | "timing": { 22 | "repeat": { 23 | "frequency": 1, 24 | "period": 1, 25 | "periodUnit": "d" 26 | } 27 | }, 28 | "doseAndRate": [ 29 | { 30 | "doseQuantity": { 31 | "value": 40, 32 | "code": "mg", 33 | "system": "http://unitsofmeasure.org", 34 | "unit": "mg" 35 | } 36 | } 37 | ] 38 | } 39 | ], 40 | "dispenseRequest": { 41 | "validityPeriod": { 42 | "start": "2021-01-01" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/MedicationRequest-eumfh-39-07-1-request.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "MedicationRequest", 3 | "id": "eumfh-39-07-1-request", 4 | "status": "active", 5 | "intent": "order", 6 | "medicationCodeableConcept": { 7 | "coding": [ 8 | { 9 | "system": "http://www.nlm.nih.gov/research/umls/rxnorm", 10 | "code": "617311", 11 | "display": "atorvastatin 40mg Oral Tablet" 12 | } 13 | ] 14 | }, 15 | "subject": { 16 | "reference": "Patient/1" 17 | }, 18 | "dosageInstruction": [ 19 | { 20 | "text": "40 mg/day", 21 | "timing": { 22 | "repeat": { 23 | "frequency": 1, 24 | "period": 1, 25 | "periodUnit": "d" 26 | } 27 | }, 28 | "doseAndRate": [ 29 | { 30 | "doseQuantity": { 31 | "value": 40, 32 | "code": "mg", 33 | "system": "http://unitsofmeasure.org", 34 | "unit": "mg" 35 | } 36 | } 37 | ] 38 | } 39 | ], 40 | "dispenseRequest": { 41 | "validityPeriod": { 42 | "start": "2021-01-01" 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/test/test_sql.js: -------------------------------------------------------------------------------- 1 | 2 | var sql = "select ca.proj_id as proj_id, ca.ca_name as proj_name, ca.ca_date_start as proj_start, ca.ca_date_end AS proj_end,\n(select COUNT(*) from rotations r \nwhere r.proj_id = proj_id and r.r_status = 'R' \ngroup by r.proj_id) r_count, \n(select count(*) from rotations r \nwhere r.proj_id = proj_id and r.channel_id = 24) r_rtb_count \nfrom projs ca, clients c, proj_auth caa \nwhere ca.client_id = 12345 and ca.client_id = c.client_id and ca_type = 'zzz' \nand c.agency_id = 0 and ca.client_id = NVL( caa.client_id, ca.client_id) \nand proj_id = NVL( caa.proj_id, proj_id) and caa.contact_id = 7890"; 3 | var sql_pp = require('../pretty-data').pd.sql(sql); 4 | var sql_min = require('../pretty-data').pd.sqlmin(sql); 5 | 6 | console.log('\n==============================================================================\n'); 7 | console.log('\n/*------- Original SQL string: -------*/\n\n' + sql + '\n'); 8 | console.log('\n/*------- Beautified SQL: -------------*/\n\n' + sql_pp + '\n'); 9 | console.log('\n/*------- Minified SQL: ---------------*/\n\n' + sql_min + '\n'); 10 | console.log('\n===============================================================================\n'); 11 | -------------------------------------------------------------------------------- /docs/Examples_Documentation.md: -------------------------------------------------------------------------------- 1 | ## Examples 2 | 3 | As part of the IPS Reference Server, we created a script (JavaScript) to load individual resources and/or Bundles. To maintain referential integrity, the script performs a bottom up load of resources and re-assigns new references based on API responses. 4 | 5 | ### Patients Available 6 | 7 | 1. EU Connectathon Sample 8 | 2. IPS IG Full Example 9 | 3. IPS IG No Info Example 10 | 4. IPS IG (adapted) No Known Example 11 | 5. Netherland Connectathon Sample 12 | 6. New Zealand Connectathon Sample 13 | 7. Taiwan Connectathon Sample 14 | 8. United Kingdom Connectathon Sample 15 | 9. US Synthetic Sample (Synthea 1) 16 | 10. US Synthetic Sample (Synthea 2) 17 | 11. US Synthetic Sample (Synthea 3) 18 | 12. US Synthetic Sample (Synthea 4) 19 | 20 | ### Script Requirements 21 | 22 | The script for patient loading requires NodeJS (v14 or higher) to be installed and for nested folders within the target directory. Each folder should only contain 1 patient, although it may include a single Bundle or multiple files with various resources. The data must be JSON. Data are loaded using API POST for the respective resources. 23 | 24 | To execute the script, navigate to local directory and run 25 | 26 | `node loading_script.js` 27 | 28 | Source code available [here](https://github.com/jddamore/fhir-ips-server/blob/main/scripts/loading_script/loading_script.js) -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Organization_890751f4-2924-4636-bab7-efffc7f3cf15.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Organization", 3 | "id": "890751f4-2924-4636-bab7-efffc7f3cf15", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"890751f4-2924-4636-bab7-efffc7f3cf15\"

identifier: id: 564738757

active: true

name: Anorg Aniza Tion BV / The best custodian ever

telecom: +31-51-34343400

address: Houttuinen 27 Dordrecht 3311 CE NL (WORK)

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.528.1.1007.3.3", 11 | "value": "564738757" 12 | } 13 | ], 14 | "active": true, 15 | "name": "Anorg Aniza Tion BV / The best custodian ever", 16 | "telecom": [ 17 | { 18 | "system": "phone", 19 | "value": "+31-51-34343400", 20 | "use": "work" 21 | } 22 | ], 23 | "address": [ 24 | { 25 | "use": "work", 26 | "line": [ 27 | "Houttuinen 27" 28 | ], 29 | "city": "Dordrecht", 30 | "postalCode": "3311 CE", 31 | "country": "NL" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Organization_890751f4-2924-4636-bab7-efffc7f3cf15.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Organization", 3 | "id": "890751f4-2924-4636-bab7-efffc7f3cf15", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"890751f4-2924-4636-bab7-efffc7f3cf15\"

identifier: id: 564738757

active: true

name: Anorg Aniza Tion BV / The best custodian ever

telecom: +31-51-34343400

address: Houttuinen 27 Dordrecht 3311 CE NL (WORK)

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.528.1.1007.3.3", 11 | "value": "564738757" 12 | } 13 | ], 14 | "active": true, 15 | "name": "Anorg Aniza Tion BV / The best custodian ever", 16 | "telecom": [ 17 | { 18 | "system": "phone", 19 | "value": "+31-51-34343400", 20 | "use": "work" 21 | } 22 | ], 23 | "address": [ 24 | { 25 | "use": "work", 26 | "line": [ 27 | "Houttuinen 27" 28 | ], 29 | "city": "Dordrecht", 30 | "postalCode": "3311 CE", 31 | "country": "NL" 32 | } 33 | ] 34 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Practitioner_1c616b24-3895-48c4-9a02-9a64110351ef.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Practitioner", 3 | "id": "1c616b24-3895-48c4-9a02-9a64110351ef", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"1c616b24-3895-48c4-9a02-9a64110351ef\"

identifier: id: 129854633

active: true

name: Beetje van Hulp

Qualifications

-Code
*Doctor of Medicine (v2 table 0360, Version 2.7#MD)
" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.528.1.1007.3.1", 11 | "value": "129854633", 12 | "assigner": { 13 | "display": "CIBG" 14 | } 15 | } 16 | ], 17 | "active": true, 18 | "name": [ 19 | { 20 | "family": "van Hulp", 21 | "given": [ 22 | "Beetje" 23 | ] 24 | } 25 | ], 26 | "qualification": [ 27 | { 28 | "code": { 29 | "coding": [ 30 | { 31 | "system": "http://terminology.hl7.org/CodeSystem/v2-0360|2.7", 32 | "code": "MD", 33 | "display": "Doctor of Medicine" 34 | } 35 | ] 36 | } 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Practitioner_1c616b24-3895-48c4-9a02-9a64110351ef.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Practitioner", 3 | "id": "1c616b24-3895-48c4-9a02-9a64110351ef", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"1c616b24-3895-48c4-9a02-9a64110351ef\"

identifier: id: 129854633

active: true

name: Beetje van Hulp

Qualifications

-Code
*Doctor of Medicine (v2 table 0360, Version 2.7#MD)
" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.528.1.1007.3.1", 11 | "value": "129854633", 12 | "assigner": { 13 | "display": "CIBG" 14 | } 15 | } 16 | ], 17 | "active": true, 18 | "name": [ 19 | { 20 | "family": "van Hulp", 21 | "given": [ 22 | "Beetje" 23 | ] 24 | } 25 | ], 26 | "qualification": [ 27 | { 28 | "code": { 29 | "coding": [ 30 | { 31 | "system": "http://terminology.hl7.org/CodeSystem/v2-0360|2.7", 32 | "code": "MD", 33 | "display": "Doctor of Medicine" 34 | } 35 | ] 36 | } 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Medication_976d0804-cae0-45ae-afe3-a19f3ceba6bc.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Medication", 3 | "id": "976d0804-cae0-45ae-afe3-a19f3ceba6bc", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"976d0804-cae0-45ae-afe3-a19f3ceba6bc\"

code: Product containing anastrozole (medicinal product) (SNOMED CT#108774000; unknown#99872 \"ANASTROZOL 1MG TABLET\"; unknown#2076667 \"ANASTROZOL CF TABLET FILMOMHULD 1MG\"; WHO ATC#L02BG03 \"anastrozole\")

" 7 | }, 8 | "code": { 9 | "coding": [ 10 | { 11 | "system": "http://snomed.info/sct", 12 | "code": "108774000", 13 | "display": "Product containing anastrozole (medicinal product)" 14 | }, 15 | { 16 | "system": "urn:oid:2.16.840.1.113883.2.4.4.1", 17 | "code": "99872", 18 | "display": "ANASTROZOL 1MG TABLET" 19 | }, 20 | { 21 | "system": "urn:oid:2.16.840.1.113883.2.4.4.7", 22 | "code": "2076667", 23 | "display": "ANASTROZOL CF TABLET FILMOMHULD 1MG" 24 | }, 25 | { 26 | "system": "http://www.whocc.no/atc", 27 | "code": "L02BG03", 28 | "display": "anastrozole" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Medication_976d0804-cae0-45ae-afe3-a19f3ceba6bc.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Medication", 3 | "id": "976d0804-cae0-45ae-afe3-a19f3ceba6bc", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"976d0804-cae0-45ae-afe3-a19f3ceba6bc\"

code: Product containing anastrozole (medicinal product) (SNOMED CT#108774000; unknown#99872 \"ANASTROZOL 1MG TABLET\"; unknown#2076667 \"ANASTROZOL CF TABLET FILMOMHULD 1MG\"; WHO ATC#L02BG03 \"anastrozole\")

" 7 | }, 8 | "code": { 9 | "coding": [ 10 | { 11 | "system": "http://snomed.info/sct", 12 | "code": "108774000", 13 | "display": "Product containing anastrozole (medicinal product)" 14 | }, 15 | { 16 | "system": "urn:oid:2.16.840.1.113883.2.4.4.1", 17 | "code": "99872", 18 | "display": "ANASTROZOL 1MG TABLET" 19 | }, 20 | { 21 | "system": "urn:oid:2.16.840.1.113883.2.4.4.7", 22 | "code": "2076667", 23 | "display": "ANASTROZOL CF TABLET FILMOMHULD 1MG" 24 | }, 25 | { 26 | "system": "http://www.whocc.no/atc", 27 | "code": "L02BG03", 28 | "display": "anastrozole" 29 | } 30 | ] 31 | } 32 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/AllergyIntolerance_c7781f44-6df8-4a8b-9e06-0b34263a47c5.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "AllergyIntolerance", 3 | "id": "c7781f44-6df8-4a8b-9e06-0b34263a47c5", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c7781f44-6df8-4a8b-9e06-0b34263a47c5\"

clinicalStatus: Active (AllergyIntolerance Clinical Status Codes#active)

code: No known food allergies (Absent and Unknown Data - IPS#no-known-food-allergies)

patient: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

" 7 | }, 8 | "clinicalStatus": { 9 | "coding": [ 10 | { 11 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 12 | "code": "active" 13 | } 14 | ] 15 | }, 16 | "code": { 17 | "coding": [ 18 | { 19 | "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", 20 | "code": "no-known-food-allergies" 21 | } 22 | ] 23 | }, 24 | "patient": { 25 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 26 | } 27 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/MedicationStatement_47524493-846a-4a26-bae2-4ab03e60f02e.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "MedicationStatement", 3 | "id": "47524493-846a-4a26-bae2-4ab03e60f02e", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"47524493-846a-4a26-bae2-4ab03e60f02e\"

identifier: id: 9e312d6b-c6b6-439a-a730-6efaa5dcf8bc

status: active

medication: See above (Medication/8adc0999-9468-4ac9-9557-680fa133d626)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2016-01-01 --> (ongoing)

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "9e312d6b-c6b6-439a-a730-6efaa5dcf8bc" 12 | } 13 | ], 14 | "status": "active", 15 | "medicationReference": { 16 | "reference": "Medication/8adc0999-9468-4ac9-9557-680fa133d626" 17 | }, 18 | "subject": { 19 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 20 | }, 21 | "effectivePeriod": { 22 | "start": "2016-01" 23 | }, 24 | "dosage": [ 25 | { 26 | "route": { 27 | "coding": [ 28 | { 29 | "system": "http://standardterms.edqm.eu", 30 | "code": "20053000", 31 | "display": "Oral use" 32 | } 33 | ] 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/MedicationStatement_47524493-846a-4a26-bae2-4ab03e60f02e.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "MedicationStatement", 3 | "id": "47524493-846a-4a26-bae2-4ab03e60f02e", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"47524493-846a-4a26-bae2-4ab03e60f02e\"

identifier: id: 9e312d6b-c6b6-439a-a730-6efaa5dcf8bc

status: active

medication: See above (Medication/8adc0999-9468-4ac9-9557-680fa133d626)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2016-01-01 --> (ongoing)

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "9e312d6b-c6b6-439a-a730-6efaa5dcf8bc" 12 | } 13 | ], 14 | "status": "active", 15 | "medicationReference": { 16 | "reference": "Medication/8adc0999-9468-4ac9-9557-680fa133d626" 17 | }, 18 | "subject": { 19 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 20 | }, 21 | "effectivePeriod": { 22 | "start": "2016-01" 23 | }, 24 | "dosage": [ 25 | { 26 | "route": { 27 | "coding": [ 28 | { 29 | "system": "http://standardterms.edqm.eu", 30 | "code": "20053000", 31 | "display": "Oral use" 32 | } 33 | ] 34 | } 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/AllergyIntolerance_c7781f44-6df8-4a8b-9e06-0b34263a47c5.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "AllergyIntolerance", 3 | "id": "c7781f44-6df8-4a8b-9e06-0b34263a47c5", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c7781f44-6df8-4a8b-9e06-0b34263a47c5\"

clinicalStatus: Active (AllergyIntolerance Clinical Status Codes#active)

code: No known food allergies (Absent and Unknown Data - IPS#no-known-food-allergies)

patient: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

" 7 | }, 8 | "clinicalStatus": { 9 | "coding": [ 10 | { 11 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 12 | "code": "active" 13 | } 14 | ] 15 | }, 16 | "code": { 17 | "coding": [ 18 | { 19 | "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", 20 | "code": "no-known-food-allergies" 21 | } 22 | ] 23 | }, 24 | "patient": { 25 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 26 | } 27 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_pregnancy_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Observation", 3 | "id" : "pregnancy-status-example", 4 | "text" : { 5 | "status" : "generated", 6 | "div" : "

Generated Narrative: Observation

Resource Observation \"pregnancy-status-example\"

status: final

code: Pregnancy status (LOINC#82810-3)

subject: Patient/patient-example-female \" DELAROSA\"

effective: 2020-01-10

value: Pregnant (LOINC#LA15173-0)

hasMember: Observation/pregnancy-edd-example

" 7 | }, 8 | "status" : "final", 9 | "code" : { 10 | "coding" : [ 11 | { 12 | "system" : "http://loinc.org", 13 | "code" : "82810-3", 14 | "display" : "Pregnancy status" 15 | } 16 | ] 17 | }, 18 | "subject" : { 19 | "reference" : "Patient/1" 20 | }, 21 | "effectiveDateTime" : "2020-01-10", 22 | "valueCodeableConcept" : { 23 | "coding" : [ 24 | { 25 | "system" : "http://loinc.org", 26 | "code" : "LA15173-0", 27 | "display" : "Pregnant" 28 | } 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_pregnancy_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Observation", 3 | "id" : "pregnancy-status-example", 4 | "text" : { 5 | "status" : "generated", 6 | "div" : "

Generated Narrative: Observation

Resource Observation \"pregnancy-status-example\"

status: final

code: Pregnancy status (LOINC#82810-3)

subject: Patient/patient-example-female \" DELAROSA\"

effective: 2020-01-10

value: Pregnant (LOINC#LA15173-0)

hasMember: Observation/pregnancy-edd-example

" 7 | }, 8 | "status" : "final", 9 | "code" : { 10 | "coding" : [ 11 | { 12 | "system" : "http://loinc.org", 13 | "code" : "82810-3", 14 | "display" : "Pregnancy status" 15 | } 16 | ] 17 | }, 18 | "subject" : { 19 | "reference" : "Patient/1" 20 | }, 21 | "effectiveDateTime" : "2020-01-10", 22 | "valueCodeableConcept" : { 23 | "coding" : [ 24 | { 25 | "system" : "http://loinc.org", 26 | "code" : "LA15173-0", 27 | "display" : "Pregnant" 28 | } 29 | ] 30 | } 31 | } -------------------------------------------------------------------------------- /docs/Code_Changes_HAPI_IPS.md: -------------------------------------------------------------------------------- 1 | ## Summary of Code Changes 2 | 3 | Three primary areas were changed in the HAPI server for the execution of the summary operation. All files were specific to a FHIR R4 implementation 4 | 5 | 1. edited file: https://github.com/CrossroadsLabs/hapi-fhir/blob/rb_jd_ips/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/BaseJpaResourceProviderPatientR4.java 6 | 2. new file: https://github.com/CrossroadsLabs/hapi-fhir/blob/rb_jd_ips/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/provider/r4/patient/PatientSummary.java 7 | 3. new file: https://github.com/CrossroadsLabs/hapi-fhir/blob/rb_jd_ips/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/ips/IPS.html 8 | 9 | The second file above is the primary logic for the summary creation. Multiple classes were added for the following purposes: 10 | 11 | - Map.ofEntries: fixed information in Composition.section 12 | - PregnancyCodes: fixed list of pregnancy LOINC codes 13 | - buildFromSearch / createIPSBundle / createResourceList : Assembles resource related to patient 14 | - createIPSComposition / Composition.SectionComponent: Creates - - Composition resource and the related section components 15 | - createIPSResourceHashMap: Assigns resources to section based on resource.resoureType or resource.category or resource.code 16 | - isObservationinSection: Logic for breaking observations out into multiple domains based on category 17 | - noInfoAllergies / noInfoMedications / noInfoProblems: Dealing with IPS conformance expectations on no information 18 | - filterPrimaries / passesFilter: Use exclusion logic to identify resources not related to Patient Summary 19 | - pruneResources: Remove resources from Bundle not related to $summary operation 20 | - createSectionNarrative: Create narrative using thyme leaf package already in HAPI server 21 | -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_social_history_alcohol.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Observation", 3 | "id" : "alcohol-use-example", 4 | "text" : { 5 | "status" : "generated", 6 | "div" : "

Generated Narrative: Observation

Resource Observation \"alcohol-use-example\"

status: final

code: Alcoholic drinks per day (LOINC#74013-4)

subject: Patient/patient-example-female \" DELAROSA\"

effective: 2019-07-15

value: 2 {wine glasses}/d (Details: UCUM code {wine glasses}/d = '{wine glasses}/d')

" 7 | }, 8 | "status" : "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "social-history" 15 | } 16 | ] 17 | } 18 | ], 19 | "code" : { 20 | "coding" : [ 21 | { 22 | "system" : "http://loinc.org", 23 | "code" : "74013-4", 24 | "display" : "Alcoholic drinks per day" 25 | } 26 | ] 27 | }, 28 | "subject" : { 29 | "reference" : "Patient/1" 30 | }, 31 | "effectiveDateTime" : "2019-07-15", 32 | "valueQuantity" : { 33 | "value" : 2, 34 | "system" : "http://unitsofmeasure.org", 35 | "code" : "{wine glasses}/d" 36 | } 37 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_social_history_alcohol.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Observation", 3 | "id" : "alcohol-use-example", 4 | "text" : { 5 | "status" : "generated", 6 | "div" : "

Generated Narrative: Observation

Resource Observation \"alcohol-use-example\"

status: final

code: Alcoholic drinks per day (LOINC#74013-4)

subject: Patient/patient-example-female \" DELAROSA\"

effective: 2019-07-15

value: 2 {wine glasses}/d (Details: UCUM code {wine glasses}/d = '{wine glasses}/d')

" 7 | }, 8 | "status" : "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "social-history" 15 | } 16 | ] 17 | } 18 | ], 19 | "code" : { 20 | "coding" : [ 21 | { 22 | "system" : "http://loinc.org", 23 | "code" : "74013-4", 24 | "display" : "Alcoholic drinks per day" 25 | } 26 | ] 27 | }, 28 | "subject" : { 29 | "reference" : "Patient/1" 30 | }, 31 | "effectiveDateTime" : "2019-07-15", 32 | "valueQuantity" : { 33 | "value" : 2, 34 | "system" : "http://unitsofmeasure.org", 35 | "code" : "{wine glasses}/d" 36 | } 37 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Medication_8adc0999-9468-4ac9-9557-680fa133d626.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Medication", 3 | "id": "8adc0999-9468-4ac9-9557-680fa133d626", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"8adc0999-9468-4ac9-9557-680fa133d626\"

code: Black Cohosh Extract herbal supplement (SNOMED CT#412588001 \"Cimicifuga racemosa extract (substance)\"; WHO ATC#G02CX04 \"Cimicifugae rhizoma\")

" 7 | }, 8 | "code": { 9 | "coding": [ 10 | { 11 | "system": "http://snomed.info/sct", 12 | "code": "412588001", 13 | "display": "Cimicifuga racemosa extract (substance)", 14 | "_display": { 15 | "extension": [ 16 | { 17 | "url": "http://hl7.org/fhir/StructureDefinition/translation", 18 | "extension": [ 19 | { 20 | "url": "lang", 21 | "valueCode": "nl-NL" 22 | }, 23 | { 24 | "url": "content", 25 | "valueString": "Zwarte Cohosh Extract" 26 | } 27 | ] 28 | } 29 | ] 30 | } 31 | }, 32 | { 33 | "system": "http://www.whocc.no/atc", 34 | "code": "G02CX04", 35 | "display": "Cimicifugae rhizoma" 36 | } 37 | ], 38 | "text": "Black Cohosh Extract herbal supplement" 39 | } 40 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Medication_8adc0999-9468-4ac9-9557-680fa133d626.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Medication", 3 | "id": "8adc0999-9468-4ac9-9557-680fa133d626", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"8adc0999-9468-4ac9-9557-680fa133d626\"

code: Black Cohosh Extract herbal supplement (SNOMED CT#412588001 \"Cimicifuga racemosa extract (substance)\"; WHO ATC#G02CX04 \"Cimicifugae rhizoma\")

" 7 | }, 8 | "code": { 9 | "coding": [ 10 | { 11 | "system": "http://snomed.info/sct", 12 | "code": "412588001", 13 | "display": "Cimicifuga racemosa extract (substance)", 14 | "_display": { 15 | "extension": [ 16 | { 17 | "url": "http://hl7.org/fhir/StructureDefinition/translation", 18 | "extension": [ 19 | { 20 | "url": "lang", 21 | "valueCode": "nl-NL" 22 | }, 23 | { 24 | "url": "content", 25 | "valueString": "Zwarte Cohosh Extract" 26 | } 27 | ] 28 | } 29 | ] 30 | } 31 | }, 32 | { 33 | "system": "http://www.whocc.no/atc", 34 | "code": "G02CX04", 35 | "display": "Cimicifugae rhizoma" 36 | } 37 | ], 38 | "text": "Black Cohosh Extract herbal supplement" 39 | } 40 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_social_history_smoking_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Observation", 3 | "id" : "tobacco-use-example", 4 | "text" : { 5 | "status" : "generated", 6 | "div" : "

Generated Narrative: Observation

Resource Observation \"tobacco-use-example\"

status: final

code: Tobacco smoking status (LOINC#72166-2)

subject: Patient/patient-example-female \" DELAROSA\"

effective: 2019-07-15

value: Former smoker (LOINC#LA15920-4)

" 7 | }, 8 | "status" : "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "social-history" 15 | } 16 | ] 17 | } 18 | ], 19 | "code" : { 20 | "coding" : [ 21 | { 22 | "system" : "http://loinc.org", 23 | "code" : "72166-2", 24 | "display" : "Tobacco smoking status" 25 | } 26 | ] 27 | }, 28 | "subject" : { 29 | "reference" : "Patient/1" 30 | }, 31 | "effectiveDateTime" : "2019-07-15", 32 | "valueCodeableConcept" : { 33 | "coding" : [ 34 | { 35 | "system" : "http://loinc.org", 36 | "code" : "LA15920-4", 37 | "display" : "Former smoker" 38 | } 39 | ] 40 | } 41 | } -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "pretty-data", 3 | "_id": "pretty-data@0.40.0", 4 | "_inBundle": false, 5 | "_integrity": "sha512-YFLnEdDEDnkt/GEhet5CYZHCvALw6+Elyb/tp8kQG03ZSIuzeaDWpZYndCXwgqu4NAjh1PI534dhDS1mHarRnQ==", 6 | "_location": "/pretty-data", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "tag", 10 | "registry": true, 11 | "raw": "pretty-data", 12 | "name": "pretty-data", 13 | "escapedName": "pretty-data", 14 | "rawSpec": "", 15 | "saveSpec": null, 16 | "fetchSpec": "latest" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz", 23 | "_shasum": "572aa8ea23467467ab94b6b5266a6fd9c8fddd72", 24 | "_spec": "pretty-data", 25 | "_where": "C:\\Users\\JohnD'Amore\\Source\\Repos\\fhir-ips-server\\examples", 26 | "author": { 27 | "name": "Vadim Kiryukhin", 28 | "email": "vkiryukhin@gmail.com" 29 | }, 30 | "bugs": { 31 | "url": "https://github.com/vkiryukhin/pretty-data/issues" 32 | }, 33 | "bundleDependencies": false, 34 | "contributors": [ 35 | { 36 | "name": "Vadim Kiryukhin", 37 | "email": "vkiryukhin@gmail.com" 38 | } 39 | ], 40 | "deprecated": false, 41 | "description": "plugin to pretty-print or minify XML, JSON, CSS and SQL files", 42 | "engine": { 43 | "node": ">=0.4.9" 44 | }, 45 | "engines": { 46 | "node": "*" 47 | }, 48 | "homepage": "https://github.com/vkiryukhin/pretty-data#readme", 49 | "keywords": [ 50 | "pretty print", 51 | "beautify", 52 | "minify", 53 | "XML", 54 | "JSON", 55 | "CSS", 56 | "SQL" 57 | ], 58 | "license": "MIT", 59 | "main": "./pretty-data", 60 | "name": "pretty-data", 61 | "repository": { 62 | "type": "git", 63 | "url": "git+ssh://git@github.com/vkiryukhin/pretty-data.git" 64 | }, 65 | "version": "0.40.0" 66 | } 67 | -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_social_history_smoking_status.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType" : "Observation", 3 | "id" : "tobacco-use-example", 4 | "text" : { 5 | "status" : "generated", 6 | "div" : "

Generated Narrative: Observation

Resource Observation \"tobacco-use-example\"

status: final

code: Tobacco smoking status (LOINC#72166-2)

subject: Patient/patient-example-female \" DELAROSA\"

effective: 2019-07-15

value: Former smoker (LOINC#LA15920-4)

" 7 | }, 8 | "status" : "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "social-history" 15 | } 16 | ] 17 | } 18 | ], 19 | "code" : { 20 | "coding" : [ 21 | { 22 | "system" : "http://loinc.org", 23 | "code" : "72166-2", 24 | "display" : "Tobacco smoking status" 25 | } 26 | ] 27 | }, 28 | "subject" : { 29 | "reference" : "Patient/1" 30 | }, 31 | "effectiveDateTime" : "2019-07-15", 32 | "valueCodeableConcept" : { 33 | "coding" : [ 34 | { 35 | "system" : "http://loinc.org", 36 | "code" : "LA15920-4", 37 | "display" : "Former smoker" 38 | } 39 | ] 40 | } 41 | } -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/README.md: -------------------------------------------------------------------------------- 1 | # pretty-data - Nodejs plugin 2 | 3 | nodejs plugin to **pretty-print** or **minify** 4 | text in **XML**, **JSON**, **CSS** and **SQL** formats. 5 | 6 | **Version** - 0.40.0 7 | 8 | **Copyright** (c) 2012 Vadim Kiryukhin ( vkiryukhin @ gmail.com ) 9 | 10 | **Home page:** [http://www.eslinstructor.net/pretty-data/](http://www.eslinstructor.net/pretty-data/) 11 | 12 | **License:** Dual licensed under 13 | the MIT and GPL licenses: 14 | 15 | [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php) 16 | 17 | [http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html) 18 | 19 | ##Description 20 | 21 | * `pd.xml(data )` - pretty print XML; 22 | 23 | * `pd.json(data)` - pretty print JSON; 24 | 25 | * `pd.css(data )` - pretty print CSS; 26 | 27 | * `pd.sql(data )` - pretty print SQL; 28 | 29 | * `pd.xmlmin(data [, preserveComments]) ` - minify XML; 30 | 31 | * `pd.jsonmin(data)` - minify JSON text; 32 | 33 | * `pd.cssmin(data [, preserveComments] )` - minify CSS text; 34 | 35 | * `pd.sqlmin(data)` - minify JSON text; 36 | 37 | **PARAMETERS:** 38 | 39 | `@data` - String; XML, JSON, CSS or SQL text to beautify; 40 | 41 | `@preserveComments` - Bool (optional, used in npp.minxml and npp.mincss only); 42 | Set this flag to true to prevent removing comments from @data; 43 | 44 | `@Return` - String; 45 | 46 | 47 | **USAGE:** 48 | 49 | `var pd = require('pretty-data').pd; ` 50 | 51 | `var xml_pp = pd.xml(data); ` 52 | 53 | `var xml_min = pd.xmlmin(data [,true]);` 54 | 55 | `var json_pp = pd.json(data);` 56 | 57 | `var json_min = pd.jsonmin(data);` 58 | 59 | `var css_pp = pd.css(data); ` 60 | 61 | `var css_min = pd.cssmin(data [, true]);` 62 | 63 | `var sql_pp = pd.sql(data);` 64 | 65 | `var sql_min = pd.sqlmin(data);` 66 | 67 | **TEST:** 68 | 69 | `node ./test/test_xml 70 | 71 | `node ./test/test_json 72 | 73 | `node ./test/test_css 74 | 75 | `node ./test/test_sql 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /docs/Project_Overview.md: -------------------------------------------------------------------------------- 1 | ## Project Overview 2 | 3 | ### Sponsoring Organizations 4 | 5 | This reference implementation server was sponsored by HL7 (Health Level Seven) as part of a grant from the ONC (US Office of the National Coordinator for Health IT). Its initial server code was created in August-September 2022 and dplyed initially utilized at the HL7 FHIR Connectathon (September 17-18, 2022). 6 | 7 | All the code has been made publicly available under APACHE 2.0 license as an adaptation of the open-source HAPI server. The server code is delivered "as-is" with no warranty and expected for future development. 8 | 9 | ### Project Goals 10 | 11 | The initial server was designed with several goals in mind: 12 | 13 | 1. Support for FHIR R4 (version 4.0.1) 14 | 2. Open development (e.g. open source code publicly hosted on Github) 15 | 3. Support for FHIR resources profiled in the IPS FHIR Implementation Guide 16 | 4. Support for the `$summary` operations that generate IPS documents 17 | 5. A set of 10+ well-populated synthetic patients and at least one example patient with no information 18 | 6. The ability to load new data into the server (e.g. POST operations) and generate new summaries 19 | 7. Valid IPS bundles for pre-loaded data 20 | 8. Demonstration filtering logic from all resources to relevant summary 21 | 9. Demonstration narrative generations for `Composition.section.text` 22 | 23 | ## Project Documentation 24 | 25 | - [Installing HAPI IPS Reference Implementation Server](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Installing_HAPI_IPS_Server.md) 26 | - [Examples Documentation](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Examples_Documentation.md) 27 | - [Summary Creation Logic](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Summary_Creation_Steps.md) 28 | - [Installing Development Environments](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Installing_Dev_Environments.md) 29 | - [Code Changes for HAPI IPS Server](https://github.com/jddamore/fhir-ips-server/blob/main/docs/Code_Changes_HAPI_IPS.md) 30 | 31 | ## For More Information 32 | 33 | - [FHIR IPS Implementation Guide (current build)](http://build.fhir.org/ig/HL7/fhir-ips) 34 | - [General Introduction to IPS](https://international-patient-summary.net/) 35 | - [HAPI Documentation](https://hapifhir.io/hapi-fhir/docs/) -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/MedicationStatement_c220e36c-eb67-4fc4-9ba1-2fabc52acec6.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "MedicationStatement", 3 | "id": "c220e36c-eb67-4fc4-9ba1-2fabc52acec6", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c220e36c-eb67-4fc4-9ba1-2fabc52acec6\"

identifier: id: b75f92cb-61d4-469a-9387-df5ef70d25f0

status: active

medication: See above (Medication/976d0804-cae0-45ae-afe3-a19f3ceba6bc)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-03-01 --> (ongoing)

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "b75f92cb-61d4-469a-9387-df5ef70d25f0" 12 | } 13 | ], 14 | "status": "active", 15 | "medicationReference": { 16 | "reference": "Medication/976d0804-cae0-45ae-afe3-a19f3ceba6bc" 17 | }, 18 | "subject": { 19 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 20 | }, 21 | "effectivePeriod": { 22 | "start": "2015-03" 23 | }, 24 | "dosage": [ 25 | { 26 | "timing": { 27 | "repeat": { 28 | "count": 1, 29 | "periodUnit": "d" 30 | } 31 | }, 32 | "route": { 33 | "coding": [ 34 | { 35 | "system": "http://standardterms.edqm.eu", 36 | "code": "20053000", 37 | "display": "Oral use" 38 | } 39 | ] 40 | }, 41 | "doseAndRate": [ 42 | { 43 | "type": { 44 | "coding": [ 45 | { 46 | "system": "http://terminology.hl7.org/CodeSystem/dose-rate-type", 47 | "code": "ordered", 48 | "display": "Ordered" 49 | } 50 | ] 51 | }, 52 | "doseQuantity": { 53 | "value": 1, 54 | "unit": "tablet", 55 | "system": "http://unitsofmeasure.org", 56 | "code": "1" 57 | } 58 | } 59 | ] 60 | } 61 | ] 62 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/MedicationStatement_c220e36c-eb67-4fc4-9ba1-2fabc52acec6.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "MedicationStatement", 3 | "id": "c220e36c-eb67-4fc4-9ba1-2fabc52acec6", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c220e36c-eb67-4fc4-9ba1-2fabc52acec6\"

identifier: id: b75f92cb-61d4-469a-9387-df5ef70d25f0

status: active

medication: See above (Medication/976d0804-cae0-45ae-afe3-a19f3ceba6bc)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-03-01 --> (ongoing)

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "b75f92cb-61d4-469a-9387-df5ef70d25f0" 12 | } 13 | ], 14 | "status": "active", 15 | "medicationReference": { 16 | "reference": "Medication/976d0804-cae0-45ae-afe3-a19f3ceba6bc" 17 | }, 18 | "subject": { 19 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 20 | }, 21 | "effectivePeriod": { 22 | "start": "2015-03" 23 | }, 24 | "dosage": [ 25 | { 26 | "timing": { 27 | "repeat": { 28 | "count": 1, 29 | "periodUnit": "d" 30 | } 31 | }, 32 | "route": { 33 | "coding": [ 34 | { 35 | "system": "http://standardterms.edqm.eu", 36 | "code": "20053000", 37 | "display": "Oral use" 38 | } 39 | ] 40 | }, 41 | "doseAndRate": [ 42 | { 43 | "type": { 44 | "coding": [ 45 | { 46 | "system": "http://terminology.hl7.org/CodeSystem/dose-rate-type", 47 | "code": "ordered", 48 | "display": "Ordered" 49 | } 50 | ] 51 | }, 52 | "doseQuantity": { 53 | "value": 1, 54 | "unit": "tablet", 55 | "system": "http://unitsofmeasure.org", 56 | "code": "1" 57 | } 58 | } 59 | ] 60 | } 61 | ] 62 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_6e39ccf3-f997-4a2b-8f28-b4b71c778c70.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "6e39ccf3-f997-4a2b-8f28-b4b71c778c70", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"6e39ccf3-f997-4a2b-8f28-b4b71c778c70\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: C Ab [Presence] in Serum or Plasma (LOINC#945-6)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:35:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Positive (SNOMED CT#10828004)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "945-6", 24 | "display": "C Ab [Presence] in Serum or Plasma" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:35:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "10828004", 42 | "display": "Positive" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_b4916505-a06b-460c-9be8-011609282457.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "b4916505-a06b-460c-9be8-011609282457", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"b4916505-a06b-460c-9be8-011609282457\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: E Ab [Presence] in Serum or Plasma (LOINC#1018-1)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:35:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Positive (SNOMED CT#10828004)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "1018-1", 24 | "display": "E Ab [Presence] in Serum or Plasma" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:35:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "10828004", 42 | "display": "Positive" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_6e39ccf3-f997-4a2b-8f28-b4b71c778c70.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "6e39ccf3-f997-4a2b-8f28-b4b71c778c70", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"6e39ccf3-f997-4a2b-8f28-b4b71c778c70\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: C Ab [Presence] in Serum or Plasma (LOINC#945-6)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:35:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Positive (SNOMED CT#10828004)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "945-6", 24 | "display": "C Ab [Presence] in Serum or Plasma" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:35:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "10828004", 42 | "display": "Positive" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_b4916505-a06b-460c-9be8-011609282457.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "b4916505-a06b-460c-9be8-011609282457", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"b4916505-a06b-460c-9be8-011609282457\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: E Ab [Presence] in Serum or Plasma (LOINC#1018-1)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:35:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Positive (SNOMED CT#10828004)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "1018-1", 24 | "display": "E Ab [Presence] in Serum or Plasma" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:35:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "10828004", 42 | "display": "Positive" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: little c Ab [Presence] in Serum or Plasma (LOINC#1156-9)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:35:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Negative (SNOMED CT#260385009)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "1156-9", 24 | "display": "little c Ab [Presence] in Serum or Plasma" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:35:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "260385009", 42 | "display": "Negative" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: little c Ab [Presence] in Serum or Plasma (LOINC#1156-9)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:35:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Negative (SNOMED CT#260385009)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "1156-9", 24 | "display": "little c Ab [Presence] in Serum or Plasma" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:35:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "260385009", 42 | "display": "Negative" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_cc354e00-a419-47ea-8b6c-1768b2a01646.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "cc354e00-a419-47ea-8b6c-1768b2a01646", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"cc354e00-a419-47ea-8b6c-1768b2a01646\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: Hemoglobin A1c/Hemoglobin.total in Blood by HPLC (LOINC#17856-6)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2017-11-10T08:20:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: 7.5 % (Details: UCUM code % = '%')

note: Above stated goal of 7.0 %

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "17856-6", 24 | "display": "Hemoglobin A1c/Hemoglobin.total in Blood by HPLC" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2017-11-10T08:20:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueQuantity": { 38 | "value": 7.5, 39 | "unit": "%", 40 | "system": "http://unitsofmeasure.org", 41 | "code": "%" 42 | }, 43 | "note": [ 44 | { 45 | "text": "Above stated goal of 7.0 %" 46 | } 47 | ] 48 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_cc354e00-a419-47ea-8b6c-1768b2a01646.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "cc354e00-a419-47ea-8b6c-1768b2a01646", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"cc354e00-a419-47ea-8b6c-1768b2a01646\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: Hemoglobin A1c/Hemoglobin.total in Blood by HPLC (LOINC#17856-6)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2017-11-10T08:20:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: 7.5 % (Details: UCUM code % = '%')

note: Above stated goal of 7.0 %

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "17856-6", 24 | "display": "Hemoglobin A1c/Hemoglobin.total in Blood by HPLC" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2017-11-10T08:20:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueQuantity": { 38 | "value": 7.5, 39 | "unit": "%", 40 | "system": "http://unitsofmeasure.org", 41 | "code": "%" 42 | }, 43 | "note": [ 44 | { 45 | "text": "Above stated goal of 7.0 %" 46 | } 47 | ] 48 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_aa11a2be-3e36-4be7-b58a-6fc3dace2741.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "aa11a2be-3e36-4be7-b58a-6fc3dace2741", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"aa11a2be-3e36-4be7-b58a-6fc3dace2741\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: ABO and Rh group [Type] in Blood (LOINC#882-1)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:15:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Blood group A Rh(D) positive (SNOMED CT#278149003)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "882-1", 24 | "display": "ABO and Rh group [Type] in Blood" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:15:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "278149003", 42 | "display": "Blood group A Rh(D) positive" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_aa11a2be-3e36-4be7-b58a-6fc3dace2741.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "aa11a2be-3e36-4be7-b58a-6fc3dace2741", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"aa11a2be-3e36-4be7-b58a-6fc3dace2741\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: ABO and Rh group [Type] in Blood (LOINC#882-1)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10T09:15:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Blood group A Rh(D) positive (SNOMED CT#278149003)

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "882-1", 24 | "display": "ABO and Rh group [Type] in Blood" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2015-10-10T09:15:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "278149003", 42 | "display": "Blood group A Rh(D) positive" 43 | } 44 | ] 45 | } 46 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_26bee0a9-5997-4557-ab9d-c6adbb05b572.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "26bee0a9-5997-4557-ab9d-c6adbb05b572", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"26bee0a9-5997-4557-ab9d-c6adbb05b572\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: Bacteria identified in Isolate (LOINC#42803-7)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2017-12-10T08:20:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Methicillin resistant Staphylococcus aureus (SNOMED CT#115329001)

note: Healthy carrier of MRSA

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "42803-7", 24 | "display": "Bacteria identified in Isolate" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2017-12-10T08:20:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "115329001", 42 | "display": "Methicillin resistant Staphylococcus aureus" 43 | } 44 | ] 45 | }, 46 | "note": [ 47 | { 48 | "text": "Healthy carrier of MRSA" 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_26bee0a9-5997-4557-ab9d-c6adbb05b572.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "26bee0a9-5997-4557-ab9d-c6adbb05b572", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"26bee0a9-5997-4557-ab9d-c6adbb05b572\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: Bacteria identified in Isolate (LOINC#42803-7)

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2017-12-10T08:20:00+01:00

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

value: Methicillin resistant Staphylococcus aureus (SNOMED CT#115329001)

note: Healthy carrier of MRSA

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "coding": [ 21 | { 22 | "system": "http://loinc.org", 23 | "code": "42803-7", 24 | "display": "Bacteria identified in Isolate" 25 | } 26 | ] 27 | }, 28 | "subject": { 29 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 30 | }, 31 | "effectiveDateTime": "2017-12-10T08:20:00+01:00", 32 | "performer": [ 33 | { 34 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 35 | } 36 | ], 37 | "valueCodeableConcept": { 38 | "coding": [ 39 | { 40 | "system": "http://snomed.info/sct", 41 | "code": "115329001", 42 | "display": "Methicillin resistant Staphylococcus aureus" 43 | } 44 | ] 45 | }, 46 | "note": [ 47 | { 48 | "text": "Healthy carrier of MRSA" 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/AllergyIntolerance_72884cad-ebe6-4f43-a51a-2f978275f132.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "AllergyIntolerance", 3 | "id": "72884cad-ebe6-4f43-a51a-2f978275f132", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"72884cad-ebe6-4f43-a51a-2f978275f132\"

identifier: id: 3a462598-009c-484a-965c-d6b24a821424

clinicalStatus: Active (AllergyIntolerance Clinical Status Codes#active)

verificationStatus: Confirmed (AllergyIntolerance Verification Status#confirmed)

type: allergy

category: medication

criticality: high

code: Substance with penicillin structure and antibacterial mechanism of action (substance) (SNOMED CT#373270004)

patient: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

onset: 2010-01-01

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "3a462598-009c-484a-965c-d6b24a821424" 12 | } 13 | ], 14 | "clinicalStatus": { 15 | "coding": [ 16 | { 17 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 18 | "code": "active" 19 | } 20 | ] 21 | }, 22 | "verificationStatus": { 23 | "coding": [ 24 | { 25 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", 26 | "code": "confirmed" 27 | } 28 | ] 29 | }, 30 | "type": "allergy", 31 | "category": [ 32 | "medication" 33 | ], 34 | "criticality": "high", 35 | "code": { 36 | "coding": [ 37 | { 38 | "system": "http://snomed.info/sct", 39 | "code": "373270004", 40 | "display": "Substance with penicillin structure and antibacterial mechanism of action (substance)" 41 | } 42 | ] 43 | }, 44 | "patient": { 45 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 46 | }, 47 | "onsetDateTime": "2010" 48 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/AllergyIntolerance_72884cad-ebe6-4f43-a51a-2f978275f132.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "AllergyIntolerance", 3 | "id": "72884cad-ebe6-4f43-a51a-2f978275f132", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"72884cad-ebe6-4f43-a51a-2f978275f132\"

identifier: id: 3a462598-009c-484a-965c-d6b24a821424

clinicalStatus: Active (AllergyIntolerance Clinical Status Codes#active)

verificationStatus: Confirmed (AllergyIntolerance Verification Status#confirmed)

type: allergy

category: medication

criticality: high

code: Substance with penicillin structure and antibacterial mechanism of action (substance) (SNOMED CT#373270004)

patient: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

onset: 2010-01-01

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "3a462598-009c-484a-965c-d6b24a821424" 12 | } 13 | ], 14 | "clinicalStatus": { 15 | "coding": [ 16 | { 17 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 18 | "code": "active" 19 | } 20 | ] 21 | }, 22 | "verificationStatus": { 23 | "coding": [ 24 | { 25 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", 26 | "code": "confirmed" 27 | } 28 | ] 29 | }, 30 | "type": "allergy", 31 | "category": [ 32 | "medication" 33 | ], 34 | "criticality": "high", 35 | "code": { 36 | "coding": [ 37 | { 38 | "system": "http://snomed.info/sct", 39 | "code": "373270004", 40 | "display": "Substance with penicillin structure and antibacterial mechanism of action (substance)" 41 | } 42 | ] 43 | }, 44 | "patient": { 45 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 46 | }, 47 | "onsetDateTime": "2010" 48 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Observation_2639657a-c19a-48e2-82cc-471e13b8ad94.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "2639657a-c19a-48e2-82cc-471e13b8ad94", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"2639657a-c19a-48e2-82cc-471e13b8ad94\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: Blood typing ()

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

hasMember:

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "text": "Blood typing" 21 | }, 22 | "subject": { 23 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 24 | }, 25 | "effectiveDateTime": "2015-10-10", 26 | "performer": [ 27 | { 28 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 29 | } 30 | ], 31 | "hasMember": [ 32 | { 33 | "reference": "Observation/aa11a2be-3e36-4be7-b58a-6fc3dace2741" 34 | }, 35 | { 36 | "reference": "Observation/6e39ccf3-f997-4a2b-8f28-b4b71c778c70" 37 | }, 38 | { 39 | "reference": "Observation/b4916505-a06b-460c-9be8-011609282457" 40 | }, 41 | { 42 | "reference": "Observation/a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4" 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Observation_2639657a-c19a-48e2-82cc-471e13b8ad94.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Observation", 3 | "id": "2639657a-c19a-48e2-82cc-471e13b8ad94", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"2639657a-c19a-48e2-82cc-471e13b8ad94\"

status: final

category: Laboratory (Observation Category Codes#laboratory)

code: Blood typing ()

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

effective: 2015-10-10

performer: See above (Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7)

hasMember:

" 7 | }, 8 | "status": "final", 9 | "category": [ 10 | { 11 | "coding": [ 12 | { 13 | "system": "http://terminology.hl7.org/CodeSystem/observation-category", 14 | "code": "laboratory" 15 | } 16 | ] 17 | } 18 | ], 19 | "code": { 20 | "text": "Blood typing" 21 | }, 22 | "subject": { 23 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 24 | }, 25 | "effectiveDateTime": "2015-10-10", 26 | "performer": [ 27 | { 28 | "reference": "Organization/45a5c5b1-4ec1-4d60-b4b2-ff5a84a41fd7" 29 | } 30 | ], 31 | "hasMember": [ 32 | { 33 | "reference": "Observation/aa11a2be-3e36-4be7-b58a-6fc3dace2741" 34 | }, 35 | { 36 | "reference": "Observation/6e39ccf3-f997-4a2b-8f28-b4b71c778c70" 37 | }, 38 | { 39 | "reference": "Observation/b4916505-a06b-460c-9be8-011609282457" 40 | }, 41 | { 42 | "reference": "Observation/a6a5a1d5-c896-4c7e-b922-888fcc7e6ae4" 43 | } 44 | ] 45 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Patient_2b90dd2b-2dab-4c75-9bb9-a355e07401e8.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Patient", 3 | "id": "2b90dd2b-2dab-4c75-9bb9-a355e07401e8", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"2b90dd2b-2dab-4c75-9bb9-a355e07401e8\"

identifier: id: 574687583

active: true

name: Martha DeLarosa

telecom: +31788700800

gender: female

birthDate: 1972-05-01

address: Laan Van Europa 1600 Dordrecht 3317 DB NL

Contacts

-RelationshipNameTelecomAddress
*mother (RoleCode#MTH)Martha Mum +33-555-20036Promenade des Anglais 111 Lyon 69001 FR
" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.840.1.113883.2.4.6.3", 11 | "value": "12223445" 12 | } 13 | ], 14 | "active": true, 15 | "name": [ 16 | { 17 | "family": "Roster", 18 | "given": [ 19 | "Angela" 20 | ] 21 | } 22 | ], 23 | "telecom": [ 24 | { 25 | "system": "phone", 26 | "value": "+31788700800", 27 | "use": "home" 28 | } 29 | ], 30 | "gender": "female", 31 | "birthDate": "1972-05-01", 32 | "address": [ 33 | { 34 | "line": [ 35 | "Laan Van Europa 1600" 36 | ], 37 | "city": "Dordrecht", 38 | "postalCode": "3317 DB", 39 | "country": "NL" 40 | } 41 | ], 42 | "contact": [ 43 | { 44 | "relationship": [ 45 | { 46 | "coding": [ 47 | { 48 | "system": "http://terminology.hl7.org/CodeSystem/v2-0131", 49 | "code": "C" 50 | }, 51 | { 52 | "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", 53 | "code": "MTH" 54 | } 55 | ] 56 | } 57 | ], 58 | "name": { 59 | "family": "Mum", 60 | "given": [ 61 | "Martha" 62 | ] 63 | }, 64 | "telecom": [ 65 | { 66 | "system": "phone", 67 | "value": "+33-555-20036", 68 | "use": "home" 69 | } 70 | ], 71 | "address": { 72 | "line": [ 73 | "Promenade des Anglais 111" 74 | ], 75 | "city": "Lyon", 76 | "postalCode": "69001", 77 | "country": "FR" 78 | } 79 | } 80 | ] 81 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-no-info/Patient_2b90dd2b-2dab-4c75-9bb9-a355e07401e8.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Patient", 3 | "id": "2b90dd2b-2dab-4c75-9bb9-a355e07401e8", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"2b90dd2b-2dab-4c75-9bb9-a355e07401e8\"

identifier: id: 574687583

active: true

name: Martha DeLarosa

telecom: +31788700800

gender: female

birthDate: 1972-05-01

address: Laan Van Europa 1600 Dordrecht 3317 DB NL

Contacts

-RelationshipNameTelecomAddress
*mother (RoleCode#MTH)Martha Mum +33-555-20036Promenade des Anglais 111 Lyon 69001 FR
" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.840.1.113883.2.4.6.3", 11 | "value": "2334132414341" 12 | } 13 | ], 14 | "active": true, 15 | "name": [ 16 | { 17 | "family": "Rodder", 18 | "given": [ 19 | "Judith" 20 | ] 21 | } 22 | ], 23 | "telecom": [ 24 | { 25 | "system": "phone", 26 | "value": "+31788700800", 27 | "use": "home" 28 | } 29 | ], 30 | "gender": "female", 31 | "birthDate": "1972-05-01", 32 | "address": [ 33 | { 34 | "line": [ 35 | "Laan Van Europa 1600" 36 | ], 37 | "city": "Dordrecht", 38 | "postalCode": "3317 DB", 39 | "country": "NL" 40 | } 41 | ], 42 | "contact": [ 43 | { 44 | "relationship": [ 45 | { 46 | "coding": [ 47 | { 48 | "system": "http://terminology.hl7.org/CodeSystem/v2-0131", 49 | "code": "C" 50 | }, 51 | { 52 | "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", 53 | "code": "MTH" 54 | } 55 | ] 56 | } 57 | ], 58 | "name": { 59 | "family": "Mum", 60 | "given": [ 61 | "Yoalnda" 62 | ] 63 | }, 64 | "telecom": [ 65 | { 66 | "system": "phone", 67 | "value": "+33-555-20036", 68 | "use": "home" 69 | } 70 | ], 71 | "address": { 72 | "line": [ 73 | "Promenade des Anglais 111" 74 | ], 75 | "city": "Lyon", 76 | "postalCode": "69001", 77 | "country": "FR" 78 | } 79 | } 80 | ] 81 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Patient_2b90dd2b-2dab-4c75-9bb9-a355e07401e8.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Patient", 3 | "id": "2b90dd2b-2dab-4c75-9bb9-a355e07401e8", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"2b90dd2b-2dab-4c75-9bb9-a355e07401e8\"

identifier: id: 574687583

active: true

name: Martha DeLarosa

telecom: +31788700800

gender: female

birthDate: 1972-05-01

address: Laan Van Europa 1600 Dordrecht 3317 DB NL

Contacts

-RelationshipNameTelecomAddress
*mother (RoleCode#MTH)Martha Mum +33-555-20036Promenade des Anglais 111 Lyon 69001 FR
" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:2.16.840.1.113883.2.4.6.3", 11 | "value": "574687583" 12 | } 13 | ], 14 | "active": true, 15 | "name": [ 16 | { 17 | "family": "DeLarosa", 18 | "given": [ 19 | "Martha" 20 | ] 21 | } 22 | ], 23 | "telecom": [ 24 | { 25 | "system": "phone", 26 | "value": "+31788700800", 27 | "use": "home" 28 | } 29 | ], 30 | "gender": "female", 31 | "birthDate": "1972-05-01", 32 | "address": [ 33 | { 34 | "line": [ 35 | "Laan Van Europa 1600" 36 | ], 37 | "city": "Dordrecht", 38 | "postalCode": "3317 DB", 39 | "country": "NL" 40 | } 41 | ], 42 | "contact": [ 43 | { 44 | "relationship": [ 45 | { 46 | "coding": [ 47 | { 48 | "system": "http://terminology.hl7.org/CodeSystem/v2-0131", 49 | "code": "C" 50 | }, 51 | { 52 | "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", 53 | "code": "MTH" 54 | } 55 | ] 56 | } 57 | ], 58 | "name": { 59 | "family": "Mum", 60 | "given": [ 61 | "Martha" 62 | ] 63 | }, 64 | "telecom": [ 65 | { 66 | "system": "phone", 67 | "value": "+33-555-20036", 68 | "use": "home" 69 | } 70 | ], 71 | "address": { 72 | "line": [ 73 | "Promenade des Anglais 111" 74 | ], 75 | "city": "Lyon", 76 | "postalCode": "69001", 77 | "country": "FR" 78 | } 79 | } 80 | ] 81 | } -------------------------------------------------------------------------------- /docs/Installing_HAPI_IPS_Server.md: -------------------------------------------------------------------------------- 1 | ## Installing HAPI IPS Server 2 | 3 | This is a general guide for setting up a hosting instance that does not attempt to build the code. This uses the JPA HAPI server framework with a Postgresql backend 4 | 5 | ### Dependencies 6 | 7 | See the dev server for setup for JDK, Maven and Postgresql. Nginx setup detailed below. 8 | 9 | - JDK 17 10 | - Maven 11 | - Postgresql 12 | - Nginx (for reverse proxy, see section below for setup) 13 | 14 | ### Target Directory 15 | 16 | The server is setup to run as a HAPI JPA Server. You can copy the WAR and JAR files produced from the hapi-fhir edited branch into the target directory. Alternatively you can change your deploy sequence to incorporation in hapi-fhir 17 | 18 | ### Open up firewall ports 19 | 20 | The AWS instance security group must allow relevant ports to be opened. This is generally 80(HTTP) and 443 (HTTPS) but possibly also 8080 (direct HAPI access). In addition the local firewal should be open as well: 21 | 22 | Check firewall status 23 | 24 | `` sudo ufw status `` 25 | 26 | Start if inactive 27 | 28 | `` sudo ufw allow 22 `` 29 | `` sudo ufw enable `` 30 | 31 | Open desired ports. Last command is optional based on whether you want bypass of Nginx open 32 | `` sudo ufw allow 80 `` 33 | `` sudo ufw allow 443 `` 34 | `` sudo ufw allow 8080 `` 35 | 36 | ### Reverse Proxy Setup (Ngnix) 37 | 38 | Install nginx 39 | 40 | ``sudo apt-get install nginx`` 41 | 42 | Setup default sites-enabled 43 | 44 | ``cd /etc/nginx/sites-enabled`` 45 | 46 | ``sudo nano default`` 47 | 48 | Paste the following below. Note that the SSL key and certificate path will need to be adjusted to location on server. In addition, certicate bundle should be concatenated. 49 | 50 | ``` 51 | server { 52 | listen 80; 53 | server_name ips.health; 54 | return 301 https://ips.health$request_uri; 55 | } 56 | ``` 57 | 58 | ``` 59 | server { 60 | listen 443 ssl; 61 | ssl_certificate /home/ubuntu/ssl-bundle.crt; 62 | ssl_certificate_key /home/ubuntu/ips.health.key; 63 | ssl_prefer_server_ciphers on; 64 | server_name ips.health; 65 | location / { 66 | proxy_pass http://localhost:8080; 67 | proxy_set_header Host $http_host; 68 | proxy_set_header X-Real-IP $remote_addr; 69 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 70 | proxy_set_header X-Forwarded-Proto $scheme; 71 | } 72 | } 73 | ``` 74 | 75 | Check the Nginx configuration 76 | 77 | ``sudo service nginx configtest`` 78 | 79 | If it says ok, restart Nginx 80 | 81 | ``sudo service nginx restart`` 82 | 83 | ### Server Customization 84 | 85 | The following defaults have been changed on the standard HAPI JPA server: 86 | 87 | - DaoConfig to use UUID strategy for id 88 | - Logo of the HAPI server 89 | - Description of the HAPI server 90 | 91 | ### Starting the Server 92 | 93 | If everything's installed and compiled, you can start server using with terminal output using 94 | 95 | `sudo java -jar target/ROOT.war` 96 | 97 | If you would like to have the server continue running after terminal hangup, use the following command: 98 | 99 | `sudo nohup java -jar target/ROOT.war &` 100 | 101 | ### Checking Ports 102 | 103 | If you run into a conflict on what's running on ports, run the following command to see port usage: 104 | 105 | `sudo netstat -tulpn` 106 | 107 | -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Condition_c4597aa2-688a-401b-a658-70acc6de28c6.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Condition", 3 | "id": "c4597aa2-688a-401b-a658-70acc6de28c6", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c4597aa2-688a-401b-a658-70acc6de28c6\"

identifier: id: 66d4a8c7-9081-43e0-a63f-489c2ae6edd6

clinicalStatus: Remission (Condition Clinical Status Codes#remission)

verificationStatus: Confirmed (ConditionVerificationStatus#confirmed)

category: Problem (LOINC#75326-9)

severity: Severe (LOINC#LA6750-9)

code: Malignant tumor of breast (SNOMED CT#254837009; unknown#8500/3 \"Infiltrating duct carcinoma, NOS\")

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

onset: 2015-01-01

abatement: 2015-03-01

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "66d4a8c7-9081-43e0-a63f-489c2ae6edd6" 12 | } 13 | ], 14 | "clinicalStatus": { 15 | "coding": [ 16 | { 17 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 18 | "code": "remission" 19 | } 20 | ] 21 | }, 22 | "verificationStatus": { 23 | "coding": [ 24 | { 25 | "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", 26 | "code": "confirmed" 27 | } 28 | ] 29 | }, 30 | "category": [ 31 | { 32 | "coding": [ 33 | { 34 | "system": "http://terminology.hl7.org/CodeSystem/condition-category", 35 | "code": "problem-list-item", 36 | "display": "Problem List Item" 37 | }, 38 | { 39 | "system": "http://loinc.org", 40 | "code": "75326-9", 41 | "display": "Problem" 42 | } 43 | ] 44 | } 45 | ], 46 | "severity": { 47 | "coding": [ 48 | { 49 | "system": "http://loinc.org", 50 | "code": "LA6750-9", 51 | "display": "Severe" 52 | } 53 | ] 54 | }, 55 | "code": { 56 | "coding": [ 57 | { 58 | "system": "http://snomed.info/sct", 59 | "code": "254837009", 60 | "display": "Malignant tumor of breast", 61 | "_display": { 62 | "extension": [ 63 | { 64 | "url": "http://hl7.org/fhir/StructureDefinition/translation", 65 | "extension": [ 66 | { 67 | "url": "lang", 68 | "valueCode": "nl-NL" 69 | }, 70 | { 71 | "url": "content", 72 | "valueString": "Borstkanker stadium II zonder aanwijzingen van recidieven na behandeling" 73 | } 74 | ] 75 | } 76 | ] 77 | } 78 | }, 79 | { 80 | "system": "urn:oid:2.16.840.1.113883.6.43.1", 81 | "code": "8500/3", 82 | "display": "Infiltrating duct carcinoma, NOS" 83 | } 84 | ] 85 | }, 86 | "subject": { 87 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 88 | }, 89 | "onsetDateTime": "2015-01", 90 | "abatementDateTime": "2015-03" 91 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Condition_c4597aa2-688a-401b-a658-70acc6de28c6.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Condition", 3 | "id": "c4597aa2-688a-401b-a658-70acc6de28c6", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c4597aa2-688a-401b-a658-70acc6de28c6\"

identifier: id: 66d4a8c7-9081-43e0-a63f-489c2ae6edd6

clinicalStatus: Remission (Condition Clinical Status Codes#remission)

verificationStatus: Confirmed (ConditionVerificationStatus#confirmed)

category: Problem (LOINC#75326-9)

severity: Severe (LOINC#LA6750-9)

code: Malignant tumor of breast (SNOMED CT#254837009; unknown#8500/3 \"Infiltrating duct carcinoma, NOS\")

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

onset: 2015-01-01

abatement: 2015-03-01

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "66d4a8c7-9081-43e0-a63f-489c2ae6edd6" 12 | } 13 | ], 14 | "clinicalStatus": { 15 | "coding": [ 16 | { 17 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 18 | "code": "remission" 19 | } 20 | ] 21 | }, 22 | "verificationStatus": { 23 | "coding": [ 24 | { 25 | "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", 26 | "code": "confirmed" 27 | } 28 | ] 29 | }, 30 | "category": [ 31 | { 32 | "coding": [ 33 | { 34 | "system": "http://terminology.hl7.org/CodeSystem/condition-category", 35 | "code": "problem-list-item", 36 | "display": "Problem List Item" 37 | }, 38 | { 39 | "system": "http://loinc.org", 40 | "code": "75326-9", 41 | "display": "Problem" 42 | } 43 | ] 44 | } 45 | ], 46 | "severity": { 47 | "coding": [ 48 | { 49 | "system": "http://loinc.org", 50 | "code": "LA6750-9", 51 | "display": "Severe" 52 | } 53 | ] 54 | }, 55 | "code": { 56 | "coding": [ 57 | { 58 | "system": "http://snomed.info/sct", 59 | "code": "254837009", 60 | "display": "Malignant tumor of breast", 61 | "_display": { 62 | "extension": [ 63 | { 64 | "url": "http://hl7.org/fhir/StructureDefinition/translation", 65 | "extension": [ 66 | { 67 | "url": "lang", 68 | "valueCode": "nl-NL" 69 | }, 70 | { 71 | "url": "content", 72 | "valueString": "Borstkanker stadium II zonder aanwijzingen van recidieven na behandeling" 73 | } 74 | ] 75 | } 76 | ] 77 | } 78 | }, 79 | { 80 | "system": "urn:oid:2.16.840.1.113883.6.43.1", 81 | "code": "8500/3", 82 | "display": "Infiltrating duct carcinoma, NOS" 83 | } 84 | ] 85 | }, 86 | "subject": { 87 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 88 | }, 89 | "onsetDateTime": "2015-01", 90 | "abatementDateTime": "2015-03" 91 | } -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-IG-example/Condition_c64139e7-f02d-409c-bf34-75e8bf23bc80.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Condition", 3 | "id": "c64139e7-f02d-409c-bf34-75e8bf23bc80", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c64139e7-f02d-409c-bf34-75e8bf23bc80\"

identifier: id: c87bf51c-e53c-4bfe-b8b7-aa62bdd93002

clinicalStatus: Active (Condition Clinical Status Codes#active)

verificationStatus: Confirmed (ConditionVerificationStatus#confirmed)

category: Problem (LOINC#75326-9)

severity: Moderate (LOINC#LA6751-7)

code: Menopausal flushing (finding) (SNOMED CT#198436008; ICD-10#N95.1 \"Menopausal and female climacteric states\")

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

onset: 2015-01-01

recordedDate: 2016-10-01

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "c87bf51c-e53c-4bfe-b8b7-aa62bdd93002" 12 | } 13 | ], 14 | "clinicalStatus": { 15 | "coding": [ 16 | { 17 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 18 | "code": "active" 19 | } 20 | ] 21 | }, 22 | "verificationStatus": { 23 | "coding": [ 24 | { 25 | "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", 26 | "code": "confirmed" 27 | } 28 | ] 29 | }, 30 | "category": [ 31 | { 32 | "coding": [ 33 | { 34 | "system": "http://terminology.hl7.org/CodeSystem/condition-category", 35 | "code": "problem-list-item", 36 | "display": "Problem List Item" 37 | }, 38 | { 39 | "system": "http://loinc.org", 40 | "code": "75326-9", 41 | "display": "Problem" 42 | } 43 | ] 44 | } 45 | ], 46 | "severity": { 47 | "coding": [ 48 | { 49 | "system": "http://loinc.org", 50 | "code": "LA6751-7", 51 | "display": "Moderate" 52 | } 53 | ] 54 | }, 55 | "code": { 56 | "coding": [ 57 | { 58 | "system": "http://snomed.info/sct", 59 | "code": "198436008", 60 | "display": "Menopausal flushing (finding)", 61 | "_display": { 62 | "extension": [ 63 | { 64 | "url": "http://hl7.org/fhir/StructureDefinition/translation", 65 | "extension": [ 66 | { 67 | "url": "lang", 68 | "valueCode": "nl-NL" 69 | }, 70 | { 71 | "url": "content", 72 | "valueString": "opvliegers" 73 | } 74 | ] 75 | } 76 | ] 77 | } 78 | }, 79 | { 80 | "system": "http://hl7.org/fhir/sid/icd-10", 81 | "code": "N95.1", 82 | "display": "Menopausal and female climacteric states" 83 | } 84 | ] 85 | }, 86 | "subject": { 87 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 88 | }, 89 | "onsetDateTime": "2015", 90 | "recordedDate": "2016-10" 91 | } -------------------------------------------------------------------------------- /examples/example_individual_resources/IPS-bundle-01/Condition_c64139e7-f02d-409c-bf34-75e8bf23bc80.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Condition", 3 | "id": "c64139e7-f02d-409c-bf34-75e8bf23bc80", 4 | "text": { 5 | "status": "generated", 6 | "div": "

Generated Narrative

Resource \"c64139e7-f02d-409c-bf34-75e8bf23bc80\"

identifier: id: c87bf51c-e53c-4bfe-b8b7-aa62bdd93002

clinicalStatus: Active (Condition Clinical Status Codes#active)

verificationStatus: Confirmed (ConditionVerificationStatus#confirmed)

category: Problem (LOINC#75326-9)

severity: Moderate (LOINC#LA6751-7)

code: Menopausal flushing (finding) (SNOMED CT#198436008; ICD-10#N95.1 \"Menopausal and female climacteric states\")

subject: See above (Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8)

onset: 2015-01-01

recordedDate: 2016-10-01

" 7 | }, 8 | "identifier": [ 9 | { 10 | "system": "urn:oid:1.2.3.999", 11 | "value": "c87bf51c-e53c-4bfe-b8b7-aa62bdd93002" 12 | } 13 | ], 14 | "clinicalStatus": { 15 | "coding": [ 16 | { 17 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 18 | "code": "active" 19 | } 20 | ] 21 | }, 22 | "verificationStatus": { 23 | "coding": [ 24 | { 25 | "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", 26 | "code": "confirmed" 27 | } 28 | ] 29 | }, 30 | "category": [ 31 | { 32 | "coding": [ 33 | { 34 | "system": "http://terminology.hl7.org/CodeSystem/condition-category", 35 | "code": "problem-list-item", 36 | "display": "Problem List Item" 37 | }, 38 | { 39 | "system": "http://loinc.org", 40 | "code": "75326-9", 41 | "display": "Problem" 42 | } 43 | ] 44 | } 45 | ], 46 | "severity": { 47 | "coding": [ 48 | { 49 | "system": "http://loinc.org", 50 | "code": "LA6751-7", 51 | "display": "Moderate" 52 | } 53 | ] 54 | }, 55 | "code": { 56 | "coding": [ 57 | { 58 | "system": "http://snomed.info/sct", 59 | "code": "198436008", 60 | "display": "Menopausal flushing (finding)", 61 | "_display": { 62 | "extension": [ 63 | { 64 | "url": "http://hl7.org/fhir/StructureDefinition/translation", 65 | "extension": [ 66 | { 67 | "url": "lang", 68 | "valueCode": "nl-NL" 69 | }, 70 | { 71 | "url": "content", 72 | "valueString": "opvliegers" 73 | } 74 | ] 75 | } 76 | ] 77 | } 78 | }, 79 | { 80 | "system": "http://hl7.org/fhir/sid/icd-10", 81 | "code": "N95.1", 82 | "display": "Menopausal and female climacteric states" 83 | } 84 | ] 85 | }, 86 | "subject": { 87 | "reference": "Patient/2b90dd2b-2dab-4c75-9bb9-a355e07401e8" 88 | }, 89 | "onsetDateTime": "2015", 90 | "recordedDate": "2016-10" 91 | } -------------------------------------------------------------------------------- /docs/Peter_Jordan_NZ_Filtering_Rules.csv: -------------------------------------------------------------------------------- 1 | GP2GP DATA CLASS,GP2GP DATA ELEMENT,IPS PROFILE,FHIR RESOURCE,FHIR DATA ELEMENT,TRANSFORMATION TASK,TRANSFORMATION CODE,COMMENTS 2 | ,,,,,,, 3 | Allergies,RECORD,AllergyIntolerance,AllergyIntolerance,RECORD,Remove duplicates,If multiples of same substance/reaction use only most recent of those entries, 4 | Allergies,substance/reaction,AllergyIntolerance,AllergyIntolerance,Code,Convert NKA to IPS absent/uknown Code,"Convert to ""no-known-allergies"", http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", 5 | ,,,,,,,Concept MUST be in FHIR Vital Signs Profile 6 | Diagnostic Reports,Code,Observation Results: Labs,Observation,Code,Convert to LOINC Code System,See 'Local Lap Mappings' Worksheet,Value must convert to a numeric (decimal) value 7 | Diagnostic Reports,Result Value,Observation Results: Labs,Observation,Value.Value,Convert to Decimal Value,Remove any unit text (e.g. 'kg') from GP2GP.Value.Value within context of LOINC Code,Assumes all weights in kg and height in cm 8 | Diagnostic Reports,Result Value,Observation Results: Labs,Observation,Value.Unit,Convert to UCUM Code,"Using LOINC Code - select appropriate UCUM Code, as per FHIR Profile", 9 | ,,,,,,, 10 | Diagnostic Report Group,RECORD,Diagnostic Report,DiagnosticReport,RECORD,Remove Incomplete & >450 day old records,Only include records marked as completed and dated within the past 15 months, 11 | Diagnostic Report Group,Status,Diagnostic Report,DiagnosticReport,Code,Exclude if not 'completed' or is empty,Remove where status is not completed, 12 | Diagnostic Report Group,Status,Diagnostic Report,DiagnosticReport,Code,Convert 'completed' status to 'final'.,IPS Profile only permits a status value of 'final' - GP2GP default is 'completed',Value must convert to a numeric (decimal) value 13 | ,,,,,,, 14 | Immunisations,RECORD,Immunization,Immunization,RECORD,Remove deprecated Influenza records,Include only a patient's last 2 immunisation jabs - and ALL their other immunisations., 15 | ,,,,,,, 16 | Medications,RECORD,Medication Statement,MedicationStatement,RECORD,Remove duplicate and inactive records,Only include one instance of a single medication code active in the past 12 months,Take status from grouping object 17 | Medications,administrationUnit.code,Medication,Medication,Code,Covert Incorrect Invalid SNOMED CT code,If SNOMED CT Code is 46992000 map to 385055001 , 18 | ,,,,,,, 19 | Problems,RECORD,Condition,Condition,RECORD,Remove duplicates,If multiples of same code and status use only most recent of these entries, 20 | Problems,RECORD,Social History: alcohol use,Observation,Code,Move alcohol use records to Observations,If coded element contains work 'drinker', 21 | Problems,RECORD,Social History: tobacco use,Observation,Code,Move smoking records to Observations,If coded element contains word 'smoke', 22 | Problems,code,Condition,Condition,Code,Convert Read Codes to SNOMED CT,"If Read Code & Term Match, use Map - otherwise select exact match to SCT Descript.",Use combination of description and Result Unit 23 | ,,,,,,,Value must convert to a numeric (decimal) value 24 | Social History,RECORD,Vital Signs,Observation,RECORD,Exclude if Type is NOT alcohol or smoking,SocialHistoryType.alcohol || shItem.historyType == SocialHistoryType.smoking,Assumes all weights in kg and height in cm 25 | Social History,RECORD,Vital Signs,Observation,RECORD,Remove duplicates,If multiples of same code and status use only most recent of these entries, 26 | Social History,Code,Social History: alcohol use,Observation,Value,Identify units (per day) from GP2GP code,Extract units from Code Display, 27 | Social History,Code,Social History: tobacco use,Observation,Code,Convert to LOINC Smoking Use Code,Use GP2GP code display to match to LOINC Value Set, 28 | Social History,Status,Social History,Observation,Status,Convert 'completed' status to 'final'.,IPS Profile only permits a status value of 'final' - GP2GP default is 'completed', 29 | Social History,Type,Social History: alcohol use,Observation,Code,Convert to LOINC Code System,"CodeableConcept(FhirLoinc.URI, ""74013-4"", ""Alcoholic drinks per day"", null)", 30 | Social History,Type,Social History: tobacco use,Observation,Code,Convert to LOINC Code System,"CodeableConcept(FhirLoinc.URI, ""72166-2"", ""Tobacco smoking status"", null);", 31 | ,,,,,,, 32 | Vital Signs,RECORD,Vital Signs,Observation,RECORD,Remove Incomplete & >450 day old records,Only include records marked as completed and dated within the past 15 months,This is the SCT concept for 'tablet' and rendered incorrectly by PMS 33 | Vital Signs,Code,Vital Signs,Observation,Code,Convert to LOINC Code System,Map to LOINC VS code using display term in GP2GP code. , 34 | Vital Signs,Value.Unit,Vital Signs,Observation,Value.Unit,Convert to UCUM Code,"Using LOINC Code - select appropriate UCUM Code, as per FHIR Profile", 35 | Vital Signs,Value.Value,Vital Signs,Observation,Value.Value,Convert to Decimal Value,Remove any unit text (e.g. 'kg') from GP2GP.Value.Value within context of LOINC Code, 36 | -------------------------------------------------------------------------------- /docs/Installing_Dev_Environments.md: -------------------------------------------------------------------------------- 1 | # Installing Development Environments 2 | 3 | ## Getting Started 4 | 5 | The HAPI International Patient Summary (IPS) Reference Implementation Server code has been performed in a way that source code changes may eventually be merged based into the core HAPI code base. As a consequence, code developed has been performed on a fork of the open-source HAPI repository. The running implementation of the HAPI server, however, is a JPA implementation of HAPI using a [PostgreSQL](https://www.postgresql.org/) database. 6 | 7 | The following development environment setup assumes an Ubuntu (22) operatiing system on a cloud (i.e. AWS for clarity here) with internet access to various packages. 8 | 9 | ### Server Selection 10 | 11 | It is recommended to use server with a good amount of compute power and RAM to compile the HAPI code based efficiently (even when not running all tests). The server used in our system is 12 | 13 | - [c5.2xlarge](https://aws.amazon.com/ec2/instance-types/c5/) vCPU = 8, 16Gb RAM 14 | - Operating System is [Ubuntu](https://ubuntu.com/) 22.04 15 | 16 | Make sure the relevant ports are opened in your VPC (e.g. 80 and 443 for HTTP/HTTPS respectively. 8080 for test/development) and that the storage is available for your planned usage (30Gb used in our example). 17 | 18 | ### Server Setup 19 | 20 | Update apt-get 21 | 22 | `sudo apt update` 23 | 24 | Install Java Development Kit (version 17) 25 | 26 | `sudo apt install -y openjdk-17-jdk` 27 | 28 | Check java version 29 | 30 | `java -version` 31 | 32 | Install Maven packages for development 33 | 34 | `sudo apt install maven -y` 35 | 36 | Install PostgreSQL 37 | 38 | `sudo apt install -y postgresql postgresql-contrib` 39 | 40 | Find where postgresql is installed and navigate to folder 41 | 42 | `cd /etc/postgresql/14/main/` 43 | `sudo nano pg_hba.conf` 44 | 45 | Within this file, change the second entry (all user) from `peer` to `md5` 46 | 47 | Restart postgresql 48 | 49 | `sudo service postgresql restart` 50 | 51 | Launch PostgreSQL 52 | 53 | `sudo -i -u postgres` 54 | 55 | Create a user 56 | 57 | `createuser --interactive` 58 | 59 | Create a database 60 | 61 | `createdb fhir` 62 | 63 | Access database 64 | 65 | `psql` 66 | 67 | 68 | Change user password 69 | 70 | `\password [USERNAME YOU CREATED]` 71 | 72 | Leave postgres 73 | 74 | `\q` 75 | 76 | `exit` 77 | 78 | Test database access 79 | 80 | `psql -d fhir -U [USERNAME YOU CREATED]` 81 | 82 | `\q` 83 | 84 | Go to home folder (or somewhere else if you prefer to change) 85 | 86 | `cd ~` 87 | 88 | Check that git is installed 89 | 90 | `git --version` 91 | 92 | ### Respository Cloning 93 | 94 | Clone both the HAPI Server and the JPA starter. Make sure that both of these directories are equivalent in the folder hierarchy since the local deployment builds across the folders 95 | 96 | `git clone https://github.com/CrossroadsLabs/hapi-fhir` 97 | `git clone https://github.com/CrossroadsLabs/hapi-fhir-jpaserver-starter` 98 | 99 | ### JPA Configuration 100 | 101 | Get started with setup for postgresql 102 | 103 | `cd hapi-fhir-jpaserver-starter` 104 | `sudo nano ./src/main/resources/application.yaml` 105 | 106 | Edit the YAML application file in the two following section 107 | 108 | [MAY CHANGE BASED ON TRANSITION TO ENV VARIABLES] 109 | datasource: 110 | url: 'jdbc:postgresql://localhost:5432/fhir' 111 | username: 112 | password: 113 | driverClassName: org.postgresql.Driver 114 | platform: postgres 115 | 116 | tests: 117 | name: Local Tester 118 | server_address: 119 | refuse _toFetch_third_party_urls: false 120 | fhir_version: R4 121 | 122 | Check that JPA server can start 123 | 124 | `sudo mvn clean package spring-boot:repackage -Pboot && java -jar target/ROOT.war` 125 | 126 | You should now be able to hit the server on 8080 (default port). We suggest to install nginx for reverse proxy for HTTP/HTTPS. Some general but reasonable [instructions](https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-as-a-web-server-and-reverse-proxy-for-apache-on-one-ubuntu-18-04-server) to get started. 127 | 128 | Only the second command is needed to start server without rebuilds. 129 | 130 | ## Working with Code and Building 131 | 132 | ### FHIR R4 Server Base & Approach to Builds 133 | 134 | The IPS Reference Implementation Server is an adaptation of the [HAPI FHIR Server](https://hapifhir.io/). HAPI is an open-source Java based platform for FHIR servers and adopted in many nations globally. General documentation on the HAPI sever is [available](https://hapifhir.io/hapi-fhir/docs/) for the [open-source HAPI repository](https://github.com/hapifhir/hapi-fhir). 135 | 136 | 137 | ### Editing the code 138 | 139 | The main code changes for the server are currently under the branch 140 | 141 | `cd ~` 142 | `cd hapi-fhir` 143 | `git checkout rb_ips` 144 | `src/main/java/ca/uhn/fhir/jpa/provider/r4/patient` 145 | 146 | PatientSummary.java is the main file for the summary generation 147 | 148 | ### Building a new deploy 149 | 150 | To build the HAPI instance using a local deployment strategy 151 | 152 | `cd ~` 153 | `cd hapi-fhir` 154 | 155 | After you complete changes, this command will deploy JAR/WAR files to target folder in ~/hapi-fhir-jpaserver-starter 156 | 157 | `sudo mvn clean deploy -DskipTests` 158 | 159 | Then you will need to rebuild the environment 160 | 161 | `sudo mvn clean package spring-boot:repackage -Pboot && java -jar target/ROOT.war` 162 | 163 | Good luck hacking! 164 | -------------------------------------------------------------------------------- /scripts/loading_script/loading_script.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs' 2 | import pretty from 'pretty-data' 3 | const pd = pretty.pd; 4 | import chalk from 'chalk' 5 | import request from 'request'; 6 | 7 | let target_url = 'https://hapi.fhir.org/baseR4/'; 8 | let target_directory = './target'; 9 | 10 | let files = fs.readdirSync('./target'); 11 | console.log('directories found to load'); 12 | console.log(pd.json(files)); 13 | 14 | let globalIndex = 0; 15 | 16 | const loadNextDirectory = function () { 17 | if (files.length <= globalIndex) { 18 | console.log(pd.json(Patients)); 19 | console.log('done'); 20 | } 21 | else { 22 | fs.stat(`./target/${files[globalIndex]}`, (err, stats) => { 23 | if (err) throw err; 24 | else if (!stats.isDirectory()) { 25 | console.log(chalk.red(`skipping file ${files[globalIndex]} not nested in folder`)); 26 | // console.log(globalIndex); 27 | globalIndex++; 28 | loadNextDirectory(); 29 | } 30 | else { 31 | recursiveLoad(`./target/${files[globalIndex]}`); 32 | }; 33 | }) 34 | } 35 | } 36 | 37 | 38 | // This is both allowable and reverse order of loading 39 | let allowableResourceTypes = [ 40 | //'Patient', this is loaded separately 41 | 'Organization', 42 | 'Practitioner', 43 | 'Device', 44 | 'Medication', 45 | 'PractitionerRole', 46 | 'Encounter', 47 | 'DeviceUseStatement', 48 | 'Media', 49 | 'Specimen', 50 | 'AllergyIntolerance', 51 | // 'CarePlan', Still needs some work for referential itnegrity 52 | 'ClinicalImpression', 53 | 'Consent', 54 | 'Condition', 55 | 'Immunization', 56 | 'Procedure', 57 | 'Observation', 58 | 'DiagnosticReport', 59 | 'MedicationRequest', 60 | 'MedicationStatement' 61 | ]; 62 | 63 | let resourcesToLoad = []; 64 | let hashMap = {}; 65 | let Patient = ''; 66 | let Patients = []; 67 | let currentPath = ''; 68 | 69 | const load = function (data, cb) { 70 | let fullUrl = data.fullUrl; 71 | delete data.fullUrl; 72 | let options = { 73 | url:`${target_url}/${data.resourceType}`, 74 | headers: {'content-type' : 'application/json'}, 75 | body: pd.json(data) 76 | } 77 | request.post(options, function(err, res) { 78 | if (!err && res.statusCode === 201) { 79 | //console.log(res.body); 80 | let body = JSON.parse(res.body); 81 | console.log(chalk.green(`${data.resourceType} ${body.id} loaded`)) 82 | hashMap[`${data.resourceType}/${data.id}`] = `${data.resourceType}/${body.id}`; 83 | hashMap[`${fullUrl}`] = `${data.resourceType}/${body.id}`; 84 | if (data.resourceType === 'Patient') Patient = `${data.resourceType}/${body.id}`; 85 | cb(); 86 | } 87 | else { 88 | console.log(chalk.red(`Failed to load ${data.resourceType}/${data.id} body below`)) 89 | console.log(chalk.yellow(pd.json(data))) 90 | cb(); 91 | } 92 | }) 93 | } 94 | 95 | const removeNarrativeExtensions = function (data) { 96 | let newArray = []; 97 | if (data && data.length){ 98 | for (let i = 0; i < data.length; i++) { 99 | if (data[i].url !== "http://hl7.org/fhir/StructureDefinition/narrativeLink") { 100 | newArray.push(data[i]); 101 | } 102 | } 103 | } 104 | return newArray; 105 | } 106 | 107 | const arrayLoad = function () { 108 | if (resourcesToLoad.length) { 109 | resourcesToLoad.sort(function (a, b) {return b.loadingOrder - a.loadingOrder}); 110 | // console.log(pd.json(resourcesToLoad)); 111 | let nextObject = resourcesToLoad.pop(); 112 | delete nextObject.loadingOrder; 113 | if (nextObject.subject) { 114 | nextObject.subject.reference = Patient; 115 | } 116 | else if (nextObject.patient) { 117 | nextObject.patient.reference = Patient; 118 | } 119 | if (nextObject.extension) { 120 | nextObject.extension = removeNarrativeExtensions(nextObject.extension); 121 | } 122 | for (let k1 in nextObject) { 123 | if(nextObject.hasOwnProperty(k1)) { 124 | if (Array.isArray(nextObject[k1])) { 125 | // console.log(`${k1} I am an array`) 126 | for (let i = 0; i < nextObject[k1].length; i++) { 127 | if (nextObject[k1][i].reference && hashMap[nextObject[k1][i].reference]) { 128 | nextObject[k1][i].reference = hashMap[nextObject[k1][i].reference]; 129 | } 130 | else if (nextObject[k1][i].individual && nextObject[k1][i].individual.reference) { 131 | nextObject[k1][i].individual.reference = hashMap[nextObject[k1][i].individual.reference]; 132 | } 133 | else if (nextObject[k1][i].actor && nextObject[k1][i].actor.reference) { 134 | nextObject[k1][i].actor.reference = hashMap[nextObject[k1][i].actor.reference]; 135 | } 136 | } 137 | } 138 | else { 139 | let reference = nextObject[k1].reference; 140 | if (reference && hashMap[reference]) { 141 | nextObject[k1].reference = hashMap[reference]; 142 | } 143 | } 144 | } 145 | } 146 | load(nextObject, arrayLoad); 147 | } 148 | else { 149 | console.log('loading done'); 150 | console.log(Patient); 151 | console.log(pd.json(hashMap)); 152 | Patients.push(`${currentPath} ---- ${Patient}`); 153 | Patient = null; 154 | hashMap = {}; 155 | globalIndex++; 156 | // console.log(globalIndex); 157 | loadNextDirectory(); 158 | } 159 | } 160 | 161 | const loadResources = function () { 162 | if(!Patient) { 163 | for (let i = 0; i < resourcesToLoad.length; i++) { 164 | if (resourcesToLoad[i].resourceType === 'Patient') { 165 | let data = resourcesToLoad[i]; 166 | resourcesToLoad.splice(i, 1); 167 | load(data, function () { 168 | loadResources(); 169 | }); 170 | break; 171 | } 172 | } 173 | } 174 | else { 175 | for (let i = 0; i < allowableResourceTypes.length; i++) { 176 | for (let j = 0; j < resourcesToLoad.length; j++) { 177 | if (allowableResourceTypes[i] === resourcesToLoad[j].resourceType) { 178 | resourcesToLoad[j].loadingOrder = i; 179 | } 180 | } 181 | } 182 | arrayLoad(); 183 | } 184 | } 185 | 186 | const checkResource = function (data) { 187 | if (data.resourceType && allowableResourceTypes.includes(data.resourceType)) { 188 | resourcesToLoad.push(data); 189 | } 190 | else if (data.resourceType === 'Patient') { 191 | resourcesToLoad.push(data); 192 | } 193 | else if (data.resourceType && data.resourceType === 'Bundle') { 194 | if (data.entry) { 195 | for (let i = 0; i < data.entry.length; i++) { 196 | if(data.entry[i].resource && data.entry[i].resource.resourceType && allowableResourceTypes.includes(data.entry[i].resource.resourceType)) { 197 | if (data.entry[i].fullUrl) data.entry[i].resource.fullUrl = data.entry[i].fullUrl; 198 | resourcesToLoad.push(data.entry[i].resource); 199 | } 200 | else if(data.entry[i].resource && data.entry[i].resource.resourceType && data.entry[i].resource.resourceType === 'Patient') { 201 | resourcesToLoad.push(data.entry[i].resource); 202 | } 203 | else { 204 | console.log(chalk.yellow(`skipping ${data.entry[i].resource.resourceType}`)); 205 | } 206 | } 207 | } 208 | } 209 | else { 210 | console.log(chalk.yellow(`skipping ${data.resourceType}`)); 211 | } 212 | } 213 | 214 | const recursiveLoad = function (filepath) { 215 | let files = fs.readdirSync(`./${filepath}`); 216 | if (!files.length) console.log(chalk.red(`Empty directory ${filepath}`)) 217 | for (let i = 0; i < files.length; i++) { 218 | if (files[i].slice(-4).toLowerCase() !== 'json' ) { 219 | console.log(chalk.yellow(`skipping file which is not JSON ${filepath}`)); 220 | } 221 | else { 222 | let file = fs.readFileSync(`./${filepath}/${files[i]}`,'utf-8'); 223 | let data = null; 224 | let resourceType = null; 225 | try { 226 | data = JSON.parse(file); 227 | } 228 | catch (e) { 229 | console.log(chalk.red(`${files[i]} is not JSON`)); 230 | } 231 | if (data) { 232 | console.log(`attempting to load ./${filepath}/${files[i]}`); 233 | currentPath = `${filepath}`; 234 | checkResource(data) 235 | }; 236 | } 237 | } 238 | loadResources(); 239 | } 240 | 241 | loadNextDirectory(); -------------------------------------------------------------------------------- /examples/node_modules/pretty-data/pretty-data.js: -------------------------------------------------------------------------------- 1 | /** 2 | * pretty-data - nodejs plugin to pretty-print or minify data in XML, JSON and CSS formats. 3 | * 4 | * Version - 0.40.0 5 | * Copyright (c) 2012 Vadim Kiryukhin 6 | * vkiryukhin @ gmail.com 7 | * http://www.eslinstructor.net/pretty-data/ 8 | * 9 | * Dual licensed under the MIT and GPL licenses: 10 | * http://www.opensource.org/licenses/mit-license.php 11 | * http://www.gnu.org/licenses/gpl.html 12 | * 13 | * pd.xml(data ) - pretty print XML; 14 | * pd.json(data) - pretty print JSON; 15 | * pd.css(data ) - pretty print CSS; 16 | * pd.sql(data) - pretty print SQL; 17 | * 18 | * pd.xmlmin(data [, preserveComments] ) - minify XML; 19 | * pd.jsonmin(data) - minify JSON; 20 | * pd.cssmin(data [, preserveComments] ) - minify CSS; 21 | * pd.sqlmin(data) - minify SQL; 22 | * 23 | * PARAMETERS: 24 | * 25 | * @data - String; XML, JSON, CSS or SQL text to beautify; 26 | * @preserveComments - Bool (optional, used in minxml and mincss only); 27 | * Set this flag to true to prevent removing comments from @text; 28 | * @Return - String; 29 | * 30 | * USAGE: 31 | * 32 | * var pd = require('pretty-data').pd; 33 | * 34 | * var xml_pp = pd.xml(xml_text); 35 | * var xml_min = pd.xmlmin(xml_text [,true]); 36 | * var json_pp = pd.json(json_text); 37 | * var json_min = pd.jsonmin(json_text); 38 | * var css_pp = pd.css(css_text); 39 | * var css_min = pd.cssmin(css_text [, true]); 40 | * var sql_pp = pd.sql(sql_text); 41 | * var sql_min = pd.sqlmin(sql_text); 42 | * 43 | * TEST: 44 | * comp-name:pretty-data$ node ./test/test_xml 45 | * comp-name:pretty-data$ node ./test/test_json 46 | * comp-name:pretty-data$ node ./test/test_css 47 | * comp-name:pretty-data$ node ./test/test_sql 48 | */ 49 | 50 | 51 | function pp() { 52 | this.shift = ['\n']; // array of shifts 53 | this.step = ' ', // 2 spaces 54 | maxdeep = 100, // nesting level 55 | ix = 0; 56 | 57 | // initialize array with shifts // 58 | for(ix=0;ix\s{0,}<") 69 | .replace(/ or -1) { 82 | str += this.shift[deep]+ar[ix]; 83 | inComment = true; 84 | // end comment or // 85 | if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1 || ar[ix].search(/!DOCTYPE/) > -1 ) { 86 | inComment = false; 87 | } 88 | } else 89 | // end comment or // 90 | if(ar[ix].search(/-->/) > -1 || ar[ix].search(/\]>/) > -1) { 91 | str += ar[ix]; 92 | inComment = false; 93 | } else 94 | // // 95 | if( /^<\w/.exec(ar[ix-1]) && /^<\/\w/.exec(ar[ix]) && 96 | /^<[\w:\-\.\,]+/.exec(ar[ix-1]) == /^<\/[\w:\-\.\,]+/.exec(ar[ix])[0].replace('/','')) { 97 | str += ar[ix]; 98 | if(!inComment) deep--; 99 | } else 100 | // // 101 | if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) == -1 && ar[ix].search(/\/>/) == -1 ) { 102 | str = !inComment ? str += this.shift[deep++]+ar[ix] : str += ar[ix]; 103 | } else 104 | // ... // 105 | if(ar[ix].search(/<\w/) > -1 && ar[ix].search(/<\//) > -1) { 106 | str = !inComment ? str += this.shift[deep]+ar[ix] : str += ar[ix]; 107 | } else 108 | // // 109 | if(ar[ix].search(/<\//) > -1) { 110 | str = !inComment ? str += this.shift[--deep]+ar[ix] : str += ar[ix]; 111 | } else 112 | // // 113 | if(ar[ix].search(/\/>/) > -1 ) { 114 | str = !inComment ? str += this.shift[deep]+ar[ix] : str += ar[ix]; 115 | } else 116 | // // 117 | if(ar[ix].search(/<\?/) > -1) { 118 | str += this.shift[deep]+ar[ix]; 119 | } else 120 | // xmlns // 121 | if( ar[ix].search(/xmlns\:/) > -1 || ar[ix].search(/xmlns\=/) > -1) { 122 | str += this.shift[deep]+ar[ix]; 123 | } 124 | 125 | else { 126 | str += ar[ix]; 127 | } 128 | } 129 | 130 | return (str[0] == '\n') ? str.slice(1) : str; 131 | } 132 | 133 | // ----------------------- JSON section ---------------------------------------------------- 134 | 135 | pp.prototype.json = function(text) { 136 | 137 | if ( typeof text === "string" ) { 138 | return JSON.stringify(JSON.parse(text), null, this.step); 139 | } 140 | if ( typeof text === "object" ) { 141 | return JSON.stringify(text, null, this.step); 142 | } 143 | return null; 144 | } 145 | 146 | // ----------------------- CSS section ---------------------------------------------------- 147 | 148 | pp.prototype.css = function(text) { 149 | 150 | var ar = text.replace(/\s{1,}/g,' ') 151 | .replace(/\{/g,"{~::~") 152 | .replace(/\}/g,"~::~}~::~") 153 | .replace(/\;/g,";~::~") 154 | .replace(/\/\*/g,"~::~/*") 155 | .replace(/\*\//g,"*/~::~") 156 | .replace(/~::~\s{0,}~::~/g,"~::~") 157 | .split('~::~'), 158 | len = ar.length, 159 | deep = 0, 160 | str = '', 161 | ix = 0; 162 | 163 | for(ix=0;ix/g,""); 295 | return str.replace(/>\s{0,}<"); 296 | } 297 | 298 | pp.prototype.jsonmin = function(text) { 299 | 300 | return text.replace(/\s{0,}\{\s{0,}/g,"{") 301 | .replace(/\s{0,}\[$/g,"[") 302 | .replace(/\[\s{0,}/g,"[") 303 | .replace(/:\s{0,}\[/g,':[') 304 | .replace(/\s{0,}\}\s{0,}/g,"}") 305 | .replace(/\s{0,}\]\s{0,}/g,"]") 306 | .replace(/\"\s{0,}\,/g,'",') 307 | .replace(/\,\s{0,}\"/g,',"') 308 | .replace(/\"\s{0,}:/g,'":') 309 | .replace(/:\s{0,}\"/g,':"') 310 | .replace(/:\s{0,}\[/g,':[') 311 | .replace(/\,\s{0,}\[/g,',[') 312 | .replace(/\,\s{2,}/g,', ') 313 | .replace(/\]\s{0,},\s{0,}\[/g,'],['); 314 | } 315 | 316 | pp.prototype.cssmin = function(text, preserveComments) { 317 | 318 | var str = preserveComments ? text 319 | : text.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"") ; 320 | return str.replace(/\s{1,}/g,' ') 321 | .replace(/\{\s{1,}/g,"{") 322 | .replace(/\}\s{1,}/g,"}") 323 | .replace(/\;\s{1,}/g,";") 324 | .replace(/\/\*\s{1,}/g,"/*") 325 | .replace(/\*\/\s{1,}/g,"*/"); 326 | } 327 | 328 | pp.prototype.sqlmin = function(text) { 329 | return text.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")"); 330 | } 331 | 332 | // -------------------------------------------------------------------------------------------- 333 | 334 | exports.pd= new pp; 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 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 [yyyy] [name of copyright owner] 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. -------------------------------------------------------------------------------- /docs/Summary_Creation_Steps.md: -------------------------------------------------------------------------------- 1 | ## Summary Creation Steps 2 | 3 | ### Data Pipeline 4 | 5 | The steps for creating an IPS follow a set of data staging pipeline steps. These are summarized below from code available in the PatientSummary.java class: 6 | 7 | 1. Get all resources related to the patient specified 8 | 2. Initialize `Bundle` and `Composition` 9 | 3. Assign resources by `ResourceType`, `category` or `code` to 14 IPS sections (see Filtering Logic for more information) 10 | 3. Evaluate if required resources are missing for required sections. If no resources found, create pseudo resource. 11 | a. Allergies List 12 | b. Problem List 13 | c. Medication List 14 | 4. Filter out resources (see Filtering Logic for more information) 15 | 5. Bundle pruning: removal of resources which have been filtered out in pipeline (See Narrative Generation) 16 | 6. Generate narrative for Composition.section 17 | 18 | ### Summary Filtering 19 | 20 | To create a summary, a set of rules are applied to filter all Patient data down to the relevant content by section for a summary. These rules should be considered preliminary and subject to future revision. 21 | 22 | **Filtering Logic (Preliminary)** 23 | - Allergies (AllergyIntolerance) 24 | - Don’t want clinicalStatus inactive|resolved 25 | - Don’t want verificationStatus entered-in-error 26 | - Problems (Condition) 27 | - Don’t want clinicalStatus inactive|resolved 28 | - Don’t want verificationStatus entered-in-error 29 | - Medications (MedicationStatement and MedicationRequest) 30 | - MedicationStatement 31 | - Only status is active|intended|unknown|on-hold 32 | - For future consideration. Maybe some statuses are filtered out if the period.high is far enough in the past or if status isn’t active… 33 | - MedicationRequest 34 | - Only status is active|unknown|on-hold 35 | - Results (DiagnosticReport and Observation where category='laboratory' 36 | - Observation 37 | - Exclude all status is preliminary 38 | - Most recent of each observation.code 39 | - DiagnosticReport 40 | - No filtering applied 41 | - Vital Signs (Observation where category='vital-signs') 42 | - Most recent of each observation.code under category ‘vital-signs’ 43 | - *For consideration, most recent of each* 44 | - *Weight* 45 | - *Height* 46 | - *BMI* 47 | - *Head circumference if age <5* 48 | - Social History (Observation where category='social-history') 49 | - Exclude all status is preliminary 50 | - Pregnancy History (Observation where code is in IPS list) 51 | - Exclude all status is preliminary 52 | - Immunizations (Immunization) 53 | - Exclude entered-in-error 54 | - Advance Directive (Consent) 55 | - Only active status 56 | - Functional Status (ClinicalImpression) 57 | - Status in-progress | completed 58 | - Medical Devices (DeviceUseStatement) 59 | - Exclude entered-in-error 60 | - Past History of Illness (Condition) 61 | - Use dates (Older than five years based on either dateTime or period.high) & clinicalStatus of inactive|remission|resolved 62 | - Exclude entered-in-error 63 | - Plan of Care 64 | - Include status of active|on-hold|unknown 65 | - Procedures 66 | - Exclude entered-in-error|not-done 67 | - *For consideration. Some procedures may merit filtering based on dates* 68 | 69 | ### Narrative Generation 70 | 71 | Narrative is required at the `Composition.section.text` within the IPS (see http://build.fhir.org/ig/HL7/fhir-ips/design.html#narrative-and-language-translation). Since individual resources may be loaded into this server with or without `Resource.text`, the server recreates narrative using machine-readable content. 72 | 73 | This narrative creation should be considered preliminary and **DRAFT** and not suitable for production implementation. To edit this formatting, you should edit the following template: hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/ips/IPS.html. Each section of the IPS has one or more tables with the following data elements: 74 | 75 | Advance Directives: 76 | - Scope: Consent.scope.text || Consent.scope.coding[x].display (separated by \
) 77 | - Status: Consent.status.code 78 | - Action Controlled: Consent.provision.action[x].{ text || coding[x].display (separated by \
)} (concatenate with comma, e.g. x, y, z) 79 | - Date: Consent.dateTime 80 | 81 | Allergies And Intolerances: 82 | - Allergen: AllergyIntolerance.code.text || AllergyIntolerance.code.coding[x].display (separated by \
) 83 | - Status: AllergyIntolerance.clinicalStatus.text || AllergyIntolerance.clinicalStatus.coding[x].code (separated by \
) 84 | - Category: AllergyIntolerance.category[x] (separated by \
) 85 | - Reaction: AllergyIntolerance.reaction.manifestation.description || AllergyIntolerance.reaction.manifestation.text || AllergyIntolerance.reaction.manifestation.coding[x].display (separated by \
) 86 | - Severity: AllergyIntolerance.reaction.severity[x].code (separated by \
) 87 | - Comments: AllergyIntolerance.note[x].text (separated by \
) 88 | - Onset: AllergyIntolerance.onsetDateTime 89 | 90 | Functional Status: 91 | - Assessment: ClinicalImpression.code.text || ClinicalImpression.code[x].display (separated by \
) 92 | - Status: ClinicalImpression.status.code 93 | - Finding: ClinicalImpression.summary 94 | - Comments: ClinicalImpression.note[x].text (separated by \
) 95 | - Date: ClinicalImpression.effectiveDateTime || ClinicalImpression.effectivePeriod.start 96 | 97 | Immunizations: 98 | - Immunization: Immunization.vaccineCode.text || Immunization.vaccineCode.coding[x].display (separated by \
) 99 | - Status: Immunization.status 100 | - Dose Number: Immunization.protocolApplied[x]{doseNumberPositiveInt || doseNumberString} (concatenate with comma, e.g. x, y, z) 101 | - Manufacturer: Organization.name 102 | - Lot Number: Immunization.lotNumber 103 | - Comments: Immunization.note[x].text (separated by \
) 104 | - Date: Immunization.occurrenceDateTime || Immunization.occurrenceString 105 | 106 | Medical Devices: 107 | - Device: Device.type.text || Device.type.coding[x].display (separated by \
) 108 | - Status: DeviceUseStatement.status 109 | - Comments: DeviceUseStatement.note[x].text (separated by \
) 110 | - Date Recorded: DeviceUseStatement.recordedDateTime 111 | 112 | Medication Summary: 113 | 114 | TABLE 1: Medication Summary: Medication Requests 115 | - Medication: MedicationRequest.medicationCodeableConcept.text || MedicationRequest.medicationCodeableConcept.coding[x].display (separated by \
) || Medication.code.text || Medication.code.coding[x].display (separated by \
) 116 | - Status: MedicationRequest.status.display 117 | - Route: MedicationRequest.dosageInstruction[x].{ route.text || route.coding[x].display (separated by \
) } (concatenate with comma, e.g. x, y, z) 118 | - Sig: MedicationRequest.dosageInstruction[x].text (display all sigs separated by \
) 119 | - Comments: MedicationRequest.note[x].text (separated by \
) 120 | - Authored Date: MedicationRequest.authoredOn 121 | 122 | TABLE 2: Medication Summary: Medication Statements 123 | - Medication: MedicationStatement.medicationCodeableConcept.text || MedicationStatement.medicationCodeableConcept.coding[x].display (separated by \
) || Medication.code.text || Medication.code.coding[x].display (separated by \
) 124 | - Status: MedicationStatement.status.display 125 | - Route: MedicationStatement.dosage[x].{ route.text || route.coding[x].display (separated by \
) } (concatenate with comma, e.g. x, y, z) 126 | - Sig: MedicationStatement.dosage[x].text (display all sigs separated by \
) 127 | - Date: MedicationStatement.effectiveDateTime || MedicationStatement.effectivePeriod.start 128 | 129 | Plan of Care 130 | - Activity: CarePlan.description 131 | - Intent: CarePlan.intent.code 132 | - Comments: CarePlan.note[x].text (separated by \
) 133 | - Planned Start: CarePlan.period.start 134 | - Planned End: CarePlan.period.end 135 | 136 | Pregnancy: 137 | - Code: Observation.code.text || Observation.code.coding[x].display (separated by \
) 138 | - Result: Observation.valueQuantity || Observation.valueDateTime || Observation.valueCodeableConcept.text || Observation.valueCodeableConcept.coding[x].display (separated by \
) || Observation.valueString 139 | - Comments: Observation.note[x].text (separated by \
) 140 | - Date: Observation.effectiveDateTime || Observation.effectivePeriod.start 141 | 142 | Problem List: 143 | - Medical Problems: Condition.code.text || Condition.code.coding[x].display (separated by \
) 144 | - Status: Condition.clinicalStatus.text || Condition.clinicalStatus.coding[x].display (separated by \
) 145 | - Comments: Condition.note[x].text (separated by \
) 146 | - Onset Date: Condition.onsetDateTime || Condition.onsetPeriod.start && “-“ && Condition.onsetPeriod.end || Condition.onsetAge || Condition.onsetRange.low && “-“ && Condition.onsetRange.high || Condition.onsetString 147 | 148 | Past History of Illnesses: 149 | - Medical Problems: Condition.code.text || Condition.code.coding[x].display (separated by \
) 150 | - Status: Condition.clinicalStatus.text || Condition.clinicalStatus.coding[x].display (separated by \
) 151 | - Comments: Condition.note[x].text (separated by \
) 152 | - Onset Date: Condition.onsetDateTime || Condition.onsetPeriod.start && “-“ && Condition.onsetPeriod.end || Condition.onsetAge || Condition.onsetRange.low && “-“ && Condition.onsetRange.high || Condition.onsetString 153 | 154 | History Of Procedures: 155 | - Procedure: Procedure.code.text || Procedure.code.coding[x].display (separated by \
) 156 | - Comments: Procedure.note[x].text(separated by \
) 157 | - Date: Procedure.performedDateTime || Procedure.performedPeriod.start && “-“ && Procedure.performedPeriod.end || Procedure.performedAge || Procedure.performedRange.low && “-“ && Procedure.performedRange.high || Procedure.performedString 158 | 159 | Diagnostic Results: 160 | 161 | TABLE 1: Diagnostic Results: Observations 162 | - Code: Observation.code.text || Observation.code.coding[x].display (separated by \
) 163 | - Result: Observation.valueQuantity || Observation.valueDateTime || Observation.valueCodeableConcept.text || Observation.valueCodeableConcept.coding[x].display (separated by \
) || Observation.valueString 164 | - Unit: Observation.valueQuantity.unit 165 | - Interpretation: Observation.interpretation[0].text || Observation.interpretation[0].coding[x].display (separated by \
) 166 | - Reference Range: Observation.referenceRange[x]{ text || low.value && “-“ && high.value} (concatenate with comma, e.g. x, y, z) 167 | - Comments: Observation.note[x].text (separated by \
) 168 | - Date: Observation.effectiveDateTime || Observation.effectivePeriod.start 169 | 170 | TABLE 2: Diagnostic Results: Diagnostic Reports 171 | - Code: DiagnosticReport.code.text || DiagnosticReport.code.coding[x].display (separated by \
) 172 | - Date: DiagnosticReport.effectiveDateTime || DiagnosticReport.effectivePeriod.start 173 | 174 | Social History: 175 | - Code: Observation.code.text || Observation.code.coding[x].display (separated by \
) 176 | - Result: Observation.valueQuantity || Observation.valueDateTime || Observation.valueCodeableConcept.text || Observation.valueCodeableConcept.coding[x].display (separated by \
) || Observation.valueString 177 | - Unit: Observation.valueQuantity.unit 178 | - Comments: Observation.note[x].text (separated by \
) 179 | - Date: Observation.effectiveDateTime || Observation.effectivePeriod.start 180 | 181 | Vital Signs: 182 | - Code: Observation.code.text || Observation.code.coding[x].display (separated by \
) 183 | - Result: Observation.valueQuantity || Observation.valueDateTime || Observation.valueCodeableConcept.text || Observation.valueCodeableConcept.coding[x].display (separated by \
) || Observation.valueString 184 | - Unit: Observation.valueQuantity.unit 185 | - Interpretation: Observation.interpretation[0].text || Observation.interpretation[0].coding[x].display (separated by \
) 186 | - Comments: Observation.note[x].text (separated by \
) 187 | - Date: Observation.effectiveDateTime || Observation.effectivePeriod.start 188 | -------------------------------------------------------------------------------- /scripts/loading_script/target/IPS-no-known/IPS_IG_bundle-no-known-required-sections.json: -------------------------------------------------------------------------------- 1 | { 2 | "resourceType": "Bundle", 3 | "id": "bundle-no-info-required-sections", 4 | "language": "en-NZ", 5 | "identifier": { 6 | "system": "urn:oid:2.16.724.4.8.10.200.10", 7 | "value": "59f51f0b-2005-485c-858e-3d3ae9657287" 8 | }, 9 | "type": "document", 10 | "timestamp": "2022-01-08T20:42:11.0607701+00:00", 11 | "entry": [ 12 | { 13 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Composition/514af4c1-194d-48b4-8afe-7be09d3f895a", 14 | "resource": { 15 | "resourceType": "Composition", 16 | "id": "514af4c1-194d-48b4-8afe-7be09d3f895a", 17 | "meta": { 18 | "versionId": "1" 19 | }, 20 | "language": "en-NZ", 21 | "text": { 22 | "status": "generated", 23 | "div": "
International Patient Summary for James Summerfield
" 24 | }, 25 | "identifier": { 26 | "system": "urn:oid:2.16.840.1.113883.2.18.7.2", 27 | "value": "59f51f0b-2005-485c-858e-3d3ae9657287" 28 | }, 29 | "status": "final", 30 | "type": { 31 | "coding": [ 32 | { 33 | "system": "http://loinc.org", 34 | "code": "60591-5", 35 | "display": "Patient summary Document" 36 | } 37 | ] 38 | }, 39 | "subject": { 40 | "reference": "Patient/AAA1234" 41 | }, 42 | "date": "2021-05-03", 43 | "author": [ 44 | { 45 | "reference": "Organization/d9b97b04-b606-4f07-baf2-7eb3dcae0a2a" 46 | } 47 | ], 48 | "title": "International Patient Summary", 49 | "confidentiality": "N", 50 | "attester": [ 51 | { 52 | "mode": "professional", 53 | "time": "2021-05-03", 54 | "party": { 55 | "reference": "PractitionerRole/f54d8c90-aea2-46b0-8f7a-8683db78344e" 56 | } 57 | } 58 | ], 59 | "custodian": { 60 | "reference": "Organization/70a756e3-20b3-4637-8601-a222983e295a" 61 | }, 62 | "relatesTo": [ 63 | { 64 | "code": "transforms", 65 | "targetIdentifier": { 66 | "system": "urn:oid:2.16.840.1.113883.2.18.7.2", 67 | "value": "59f51f0b-2005-485c-858e-3d3ae9657287" 68 | } 69 | } 70 | ], 71 | "event": [ 72 | { 73 | "code": [ 74 | { 75 | "coding": [ 76 | { 77 | "system": "http://terminology.hl7.org/CodeSystem/v3-ActClass", 78 | "code": "PCPR" 79 | } 80 | ] 81 | } 82 | ], 83 | "period": { 84 | "end": "2021-05-03" 85 | } 86 | } 87 | ], 88 | "section": [ 89 | { 90 | "title": "Allergies and Intolerances", 91 | "code": { 92 | "coding": [ 93 | { 94 | "system": "http://loinc.org", 95 | "code": "48765-2", 96 | "display": "Allergies and adverse reactions Document" 97 | } 98 | ] 99 | }, 100 | "text": { 101 | "status": "generated", 102 | "div": "
There is no information available regarding the subject's allergy conditions.
" 103 | }, 104 | "entry": [ 105 | { 106 | "reference": "AllergyIntolerance/e198be1e-9861-46af-9d97-841ef9f7c707" 107 | } 108 | ] 109 | }, 110 | { 111 | "title": "Problem List", 112 | "code": { 113 | "coding": [ 114 | { 115 | "system": "http://loinc.org", 116 | "code": "11450-4", 117 | "display": "Problem list - Reported" 118 | } 119 | ] 120 | }, 121 | "text": { 122 | "status": "generated", 123 | "div": "
There is no information available about the subject's health problems or disabilities.
" 124 | }, 125 | "entry": [ 126 | { 127 | "reference": "Condition/da138a5d-633f-493f-9485-e5af1320db5b" 128 | } 129 | ] 130 | }, 131 | { 132 | "title": "Medication Summary", 133 | "code": { 134 | "coding": [ 135 | { 136 | "system": "http://loinc.org", 137 | "code": "10160-0", 138 | "display": "History of Medication use Narrative" 139 | } 140 | ] 141 | }, 142 | "text": { 143 | "status": "generated", 144 | "div": "
There is no information available about the subject's medication use or administration.
" 145 | }, 146 | "entry": [ 147 | { 148 | "reference": "MedicationStatement/ceb9a0d2-454c-4834-be55-2fa1eb2acd49" 149 | } 150 | ] 151 | }, 152 | { 153 | "title": "Immunizations", 154 | "code": { 155 | "coding": [ 156 | { 157 | "system": "http://loinc.org", 158 | "code": "11369-6", 159 | "display": "History of Immunization Narrative" 160 | } 161 | ] 162 | }, 163 | "text": { 164 | "status": "generated", 165 | "div": "
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
VaccineDateSeqRouteSiteIndicationStatus
Influenza03/07/20202Injection, intramuscularEntire left upper armEligible condition (Influenza)completed
Influenza03/06/20191Injection, intramuscularEntire left upper armEligible condition (Influenza)completed
\r\n
" 166 | }, 167 | "entry": [ 168 | { 169 | "reference": "Immunization/4ab062b3-8843-4b98-af62-3d6d178a3772" 170 | }, 171 | { 172 | "reference": "Immunization/bd6c6537-6c5a-4fa8-8d26-2b49377425a2" 173 | } 174 | ] 175 | } 176 | ] 177 | } 178 | }, 179 | { 180 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Patient/AAA1234", 181 | "resource": { 182 | "resourceType": "Patient", 183 | "id": "AAA1234", 184 | "text": { 185 | "status": "generated", 186 | "div": "
Name: James Summerfield
" 187 | }, 188 | "identifier": [ 189 | { 190 | "system": "https://standards.digital.health.nz/ns/nhi-id", 191 | "value": "AAA1234" 192 | } 193 | ], 194 | "name": [ 195 | { 196 | "use": "usual", 197 | "family": "Sommerfield", 198 | "given": [ 199 | "James" 200 | ] 201 | } 202 | ], 203 | "telecom": [ 204 | { 205 | "system": "phone", 206 | "value": "tel:+6478532279", 207 | "use": "home" 208 | } 209 | ], 210 | "gender": "male", 211 | "birthDate": "1985-04-25", 212 | "address": [ 213 | { 214 | "use": "home", 215 | "type": "physical", 216 | "line": [ 217 | "Bleak House", 218 | "3 Worcester Drive", 219 | "Rototuna North" 220 | ], 221 | "city": "Hamilton", 222 | "postalCode": "3210", 223 | "country": "NZ" 224 | } 225 | ], 226 | "maritalStatus": { 227 | "coding": [ 228 | { 229 | "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus", 230 | "code": "M", 231 | "display": "Married" 232 | } 233 | ] 234 | }, 235 | "contact": [ 236 | { 237 | "relationship": [ 238 | { 239 | "coding": [ 240 | { 241 | "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", 242 | "code": "FAMMEMB", 243 | "display": "family member" 244 | }, 245 | { 246 | "system": "http://terminology.hl7.org/CodeSystem/v2-0131", 247 | "code": "N", 248 | "display": "Next-of-Kin" 249 | } 250 | ] 251 | } 252 | ], 253 | "name": { 254 | "use": "usual", 255 | "family": "mother", 256 | "given": [ 257 | "Natural", 258 | "mother" 259 | ] 260 | } 261 | }, 262 | { 263 | "relationship": [ 264 | { 265 | "coding": [ 266 | { 267 | "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", 268 | "code": "FRND", 269 | "display": "unrelated friend" 270 | }, 271 | { 272 | "system": "http://terminology.hl7.org/CodeSystem/v2-0131", 273 | "code": "C", 274 | "display": "Emergency Contact" 275 | } 276 | ] 277 | } 278 | ], 279 | "name": { 280 | "use": "usual", 281 | "family": "Rabbit", 282 | "given": [ 283 | "Peter", 284 | "Rabbit" 285 | ] 286 | }, 287 | "telecom": [ 288 | { 289 | "system": "phone", 290 | "value": "07 853 9191", 291 | "use": "home" 292 | } 293 | ], 294 | "address": { 295 | "use": "home", 296 | "type": "physical", 297 | "line": [ 298 | "9 Worcester Drive", 299 | "Rototuna" 300 | ], 301 | "city": "Hamilton", 302 | "postalCode": "3210", 303 | "country": "NZ" 304 | } 305 | } 306 | ], 307 | "communication": [ 308 | { 309 | "language": { 310 | "coding": [ 311 | { 312 | "system": "urn:ietf:bcp:47", 313 | "code": "en-NZ" 314 | } 315 | ] 316 | } 317 | } 318 | ] 319 | } 320 | }, 321 | { 322 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Organization/d9b97b04-b606-4f07-baf2-7eb3dcae0a2a", 323 | "resource": { 324 | "resourceType": "Organization", 325 | "id": "d9b97b04-b606-4f07-baf2-7eb3dcae0a2a", 326 | "identifier": [ 327 | { 328 | "system": "https://standards.digital.health.nz/ns/hpi-facility-id", 329 | "value": "F0K068-E" 330 | } 331 | ], 332 | "name": "Northcare, Thomas Road" 333 | } 334 | }, 335 | { 336 | "fullUrl": "https://terminz.azurewebsites.net/fhir/PractitionerRole/f54d8c90-aea2-46b0-8f7a-8683db78344e", 337 | "resource": { 338 | "resourceType": "PractitionerRole", 339 | "id": "f54d8c90-aea2-46b0-8f7a-8683db78344e", 340 | "practitioner": { 341 | "reference": "Practitioner/19c24876-ccf8-45e7-8b66-462317e970f1" 342 | }, 343 | "code": [ 344 | { 345 | "coding": [ 346 | { 347 | "system": "http://snomed.info/sct", 348 | "code": "158965000", 349 | "display": "Doctor" 350 | } 351 | ] 352 | } 353 | ] 354 | } 355 | }, 356 | { 357 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Practitioner/19c24876-ccf8-45e7-8b66-462317e970f1", 358 | "resource": { 359 | "resourceType": "Practitioner", 360 | "id": "19c24876-ccf8-45e7-8b66-462317e970f1", 361 | "name": [ 362 | { 363 | "use": "usual", 364 | "family": "Kildare", 365 | "given": [ 366 | "Dr", 367 | "Richard", 368 | "Kildare" 369 | ] 370 | } 371 | ], 372 | "telecom": [ 373 | { 374 | "system": "phone", 375 | "value": "tel:+6478539191", 376 | "use": "work" 377 | } 378 | ], 379 | "address": [ 380 | { 381 | "use": "work", 382 | "type": "physical", 383 | "line": [ 384 | "12 Thomas Rd", 385 | "Huntingdon" 386 | ], 387 | "city": "Hamilton", 388 | "postalCode": "3211", 389 | "country": "NZ" 390 | } 391 | ] 392 | } 393 | }, 394 | { 395 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Organization/70a756e3-20b3-4637-8601-a222983e295a", 396 | "resource": { 397 | "resourceType": "Organization", 398 | "id": "70a756e3-20b3-4637-8601-a222983e295a", 399 | "identifier": [ 400 | { 401 | "system": "https://standards.digital.health.nz/ns/psychotherapists-board-id", 402 | "value": "F2N000-J" 403 | } 404 | ], 405 | "name": "NorthCare Pukete Road" 406 | } 407 | }, 408 | { 409 | "fullUrl": "https://terminz.azurewebsites.net/fhir/AllergyIntolerance/e198be1e-9861-46af-9d97-841ef9f7c707", 410 | "resource": { 411 | "resourceType": "AllergyIntolerance", 412 | "id": "e198be1e-9861-46af-9d97-841ef9f7c707", 413 | "clinicalStatus": { 414 | "coding": [ 415 | { 416 | "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", 417 | "code": "active" 418 | } 419 | ] 420 | }, 421 | "code": { 422 | "coding": [ 423 | { 424 | "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", 425 | "code": "no-known-allergies", 426 | "display": "No known allergies" 427 | } 428 | ] 429 | }, 430 | "patient": { 431 | "reference": "Patient/AAA1234" 432 | } 433 | } 434 | }, 435 | { 436 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Condition/da138a5d-633f-493f-9485-e5af1320db5b", 437 | "resource": { 438 | "resourceType": "Condition", 439 | "id": "da138a5d-633f-493f-9485-e5af1320db5b", 440 | "clinicalStatus": { 441 | "coding": [ 442 | { 443 | "system": "http://terminology.hl7.org/CodeSystem/condition-clinical", 444 | "code": "active" 445 | } 446 | ] 447 | }, 448 | "code": { 449 | "coding": [ 450 | { 451 | "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", 452 | "code": "no-known-problems", 453 | "display": "No known problems" 454 | } 455 | ] 456 | }, 457 | "subject": { 458 | "reference": "Patient/AAA1234" 459 | } 460 | } 461 | }, 462 | { 463 | "fullUrl": "https://terminz.azurewebsites.net/fhir/MedicationStatement/ceb9a0d2-454c-4834-be55-2fa1eb2acd49", 464 | "resource": { 465 | "resourceType": "MedicationStatement", 466 | "id": "ceb9a0d2-454c-4834-be55-2fa1eb2acd49", 467 | "status": "unknown", 468 | "medicationCodeableConcept": { 469 | "coding": [ 470 | { 471 | "system": "http://hl7.org/fhir/uv/ips/CodeSystem/absent-unknown-uv-ips", 472 | "code": "no-known-medication", 473 | "display": "No known medications" 474 | } 475 | ] 476 | }, 477 | "subject": { 478 | "reference": "Patient/AAA1234" 479 | }, 480 | "effectivePeriod": { 481 | "extension": [ 482 | { 483 | "url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason", 484 | "valueCode": "not-applicable" 485 | } 486 | ] 487 | } 488 | } 489 | }, 490 | { 491 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Immunization/4ab062b3-8843-4b98-af62-3d6d178a3772", 492 | "resource": { 493 | "resourceType": "Immunization", 494 | "id": "4ab062b3-8843-4b98-af62-3d6d178a3772", 495 | "status": "completed", 496 | "vaccineCode": { 497 | "coding": [ 498 | { 499 | "system": "http://hl7.org/fhir/sid/cvx", 500 | "code": "141", 501 | "display": "Influenza, seasonal, injectable" 502 | } 503 | ] 504 | }, 505 | "patient": { 506 | "reference": "Patient/AAA1234" 507 | }, 508 | "occurrenceDateTime": "2020-07-03", 509 | "lotNumber": "B52b", 510 | "expirationDate": "2020-07-03", 511 | "site": { 512 | "coding": [ 513 | { 514 | "system": "http://snomed.info/sct", 515 | "code": "72098002", 516 | "display": "Entire left upper arm" 517 | } 518 | ] 519 | }, 520 | "route": { 521 | "coding": [ 522 | { 523 | "system": "http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration", 524 | "code": "IM", 525 | "display": "Injection, intramuscular" 526 | } 527 | ] 528 | }, 529 | "performer": [ 530 | { 531 | "actor": { 532 | "reference": "Organization/70a756e3-20b3-4637-8601-a222983e295a" 533 | } 534 | } 535 | ], 536 | "protocolApplied": [ 537 | { 538 | "series": "45y (Eligible condition (Influenza))", 539 | "doseNumberPositiveInt": 2 540 | } 541 | ] 542 | } 543 | }, 544 | { 545 | "fullUrl": "https://terminz.azurewebsites.net/fhir/Immunization/bd6c6537-6c5a-4fa8-8d26-2b49377425a2", 546 | "resource": { 547 | "resourceType": "Immunization", 548 | "id": "bd6c6537-6c5a-4fa8-8d26-2b49377425a2", 549 | "status": "completed", 550 | "vaccineCode": { 551 | "coding": [ 552 | { 553 | "system": "http://hl7.org/fhir/sid/cvx", 554 | "code": "141", 555 | "display": "Influenza, seasonal, injectable" 556 | } 557 | ] 558 | }, 559 | "patient": { 560 | "reference": "Patient/AAA1234" 561 | }, 562 | "occurrenceDateTime": "2019-06-03", 563 | "lotNumber": "B52", 564 | "expirationDate": "2019-08-03", 565 | "site": { 566 | "coding": [ 567 | { 568 | "system": "http://snomed.info/sct", 569 | "code": "72098002", 570 | "display": "Entire left upper arm" 571 | } 572 | ] 573 | }, 574 | "route": { 575 | "coding": [ 576 | { 577 | "system": "http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration", 578 | "code": "IM", 579 | "display": "Injection, intramuscular" 580 | } 581 | ] 582 | }, 583 | "performer": [ 584 | { 585 | "actor": { 586 | "reference": "Organization/70a756e3-20b3-4637-8601-a222983e295a" 587 | } 588 | } 589 | ], 590 | "protocolApplied": [ 591 | { 592 | "series": "45y (Eligible condition (Influenza))", 593 | "doseNumberPositiveInt": 1 594 | } 595 | ] 596 | } 597 | } 598 | ] 599 | } --------------------------------------------------------------------------------