Skip to content

Commit 15fe33c

Browse files
authored
Merge pull request #124 from jembi/hearth-162-story-fix-mhd-support
Hearth 162 story fix mhd support
2 parents b5fd90b + edac3e3 commit 15fe33c

39 files changed

+15050
-7308
lines changed

config/default.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"server": {
33
"hostname": "0.0.0.0",
44
"publicFhirBase": "http://localhost:3447/fhir",
5-
"port": 3447
5+
"port": 3447,
6+
"fhirVersion": "dstu2"
67
},
78
"mongodb": {
89
"url": "mongodb://localhost/hearth"
@@ -31,5 +32,11 @@
3132
"matchingQueue": {
3233
"numberOfWorkers": 2,
3334
"pollingInterval": 1000
35+
},
36+
"validation": {
37+
"enabled": false,
38+
"additionProfilePaths": [
39+
"lib/fhir/profiles/mhd"
40+
]
3441
}
3542
}

lib/fhir/profile-loader.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Copyright (c) 2017-present, Jembi Health Systems NPC.
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the BSD-style license found in the
6+
* LICENSE file in the root directory of this source tree.
7+
*/
8+
9+
'use strict'
10+
11+
const fs = require('fs')
12+
const path = require('path')
13+
14+
const profiles = {}
15+
16+
module.exports = () => {
17+
return {
18+
loadProfiles: (paths) => {
19+
paths.forEach((profilePath) => {
20+
if (!profilePath.startsWith('/')) {
21+
profilePath = `${global.appRoot}/${profilePath}`
22+
}
23+
fs.readdirSync(path.resolve(profilePath)).filter((file) => file.endsWith('.json')).forEach((file) => {
24+
const profile = require(`${profilePath}/${file}`)
25+
profiles[profile.type] = profile
26+
})
27+
})
28+
},
29+
30+
getProfiles: () => {
31+
return profiles
32+
}
33+
}
34+
}
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"resourceType": "StructureDefinition",
3+
"id": "IHE.MHD.DocumentManifest",
4+
"text": {
5+
"status": "additional",
6+
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\r\n\tStructureDefinition for DocumentManifest as represented in the Provide and Query interactions in the \r\n IHE IT Infrastructure Technical Framework Supplement <a href=\"http://wiki.ihe.net/index.php/Mobile_access_to_Health_Documents_(MHD)\">Mobile access to Health Documents (MHD) Rev. 2.3</a></div>"
7+
},
8+
"url": "http://ihe.net/fhir/StructureDefinition/IHE.MHD.DocumentManifest",
9+
"name": "IHE.MHD.DocumentManifest",
10+
"title": "IHE MHD Profile on DocumentManifest (SubmissionSet)",
11+
"status": "draft",
12+
"experimental": false,
13+
"date": "2017-12-21",
14+
"publisher": "Integrating the Healthcare Enterprise (IHE)",
15+
"contact": [
16+
{
17+
"name": "IHE",
18+
"telecom": [
19+
{
20+
"system": "url",
21+
"value": "http://ihe.net"
22+
}
23+
]
24+
},
25+
{
26+
"name": "John Moehrke",
27+
"telecom": [
28+
{
29+
"system": "email",
30+
"value": "[email protected]"
31+
}
32+
]
33+
}
34+
],
35+
"description": "Profile on DocumentManifest based on IHE IT Infrastructure Technical Framework Supplement - Mobile access to Health Documents (MHD) Rev. 2.3. See http://wiki.ihe.net/index.php/Mobile_access_to_Health_Documents_(MHD)",
36+
"copyright": "IHE http://www.ihe.net/Governance/#Intellectual_Property",
37+
"fhirVersion": "3.0.1",
38+
"kind": "resource",
39+
"abstract": false,
40+
"type": "DocumentManifest",
41+
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentManifest",
42+
"derivation": "constraint",
43+
"differential": {
44+
"element": [
45+
{
46+
"id": "DocumentManifest.masterIdentifier",
47+
"path": "DocumentManifest.masterIdentifier",
48+
"min": 1
49+
},
50+
{
51+
"id": "DocumentManifest.identifier",
52+
"path": "DocumentManifest.identifier",
53+
"min": 1
54+
},
55+
{
56+
"id": "DocumentManifest.status",
57+
"path": "DocumentManifest.status",
58+
"comment": "approved -> status=current\r\ndeprecated -> status=superseded"
59+
},
60+
{
61+
"id": "DocumentManifest.type",
62+
"path": "DocumentManifest.type",
63+
"min": 1
64+
},
65+
{
66+
"id": "DocumentManifest.subject",
67+
"path": "DocumentManifest.subject",
68+
"comment": "Not a contained resource. URL Points to an existing Patient resource representing Affinity Domain Patient",
69+
"min": 1,
70+
"type": [
71+
{
72+
"code": "Reference",
73+
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
74+
}
75+
]
76+
},
77+
{
78+
"id": "DocumentManifest.created",
79+
"path": "DocumentManifest.created",
80+
"min": 1
81+
},
82+
{
83+
"id": "DocumentManifest.author",
84+
"path": "DocumentManifest.author",
85+
"comment": "Contained author resource of type Practitioner with:\r\n* authorInstitution: Organization\r\n* authorPerson: Practitioner.identifier and Practitioner.name\r\n* authorRole:—Not supported in STU3\r\n* authorSpecialty: Practitioner.qualification\r\n* authorTelecommunication: Practitioner.telecom",
86+
"type": [
87+
{
88+
"code": "Reference",
89+
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Practitioner"
90+
},
91+
{
92+
"code": "Reference",
93+
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
94+
}
95+
],
96+
"mustSupport": true
97+
},
98+
{
99+
"id": "DocumentManifest.source",
100+
"path": "DocumentManifest.source",
101+
"min": 1
102+
},
103+
{
104+
"id": "DocumentManifest.content.p[x]:pReference",
105+
"path": "DocumentManifest.content.pReference",
106+
"sliceName": "pReference",
107+
"type": [
108+
{
109+
"code": "Reference",
110+
"targetProfile": "http://ihe.net/fhir/StructureDefinition/IHE.MHD.ProvideDocumentBundle.Minimal"
111+
},
112+
{
113+
"code": "Reference",
114+
"targetProfile": "http://ihe.net/fhir/StructureDefinition/IHE.MHD.ProvideDocumentBundle.Comprehensive"
115+
},
116+
{
117+
"code": "Reference",
118+
"targetProfile": "http://ihe.net/fhir/StructureDefinition/IHE.MHD.Query.Minimal.DocumentReference"
119+
},
120+
{
121+
"code": "Reference",
122+
"targetProfile": "http://ihe.net/fhir/StructureDefinition/IHE.MHD.Query.Comprehensive.DocumentReference"
123+
},
124+
{
125+
"code": "Reference",
126+
"targetProfile": "http://hl7.org/fhir/StructureDefinition/DocumentReference"
127+
}
128+
]
129+
},
130+
{
131+
"id": "DocumentManifest.related",
132+
"path": "DocumentManifest.related",
133+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
134+
"max": "0"
135+
}
136+
]
137+
}
138+
}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"resourceType": "StructureDefinition",
3+
"id": "IHE.MHD.List",
4+
"text": {
5+
"status": "additional",
6+
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\r\n\tStructureDefinition for List Resource supporting XDS Folders in the \r\n IHE IT Infrastructure Technical Framework Supplement <a href=\"http://wiki.ihe.net/index.php/Mobile_access_to_Health_Documents_(MHD)\">Mobile access to Health Documents (MHD) Rev. 2.3</a></div>"
7+
},
8+
"url": "http://ihe.net/fhir/StructureDefinition/IHE.MHD.List",
9+
"name": "IHE.MHD.List",
10+
"title": "IHE MHD Profile on List (Folder)",
11+
"status": "draft",
12+
"experimental": false,
13+
"date": "2017-12-18",
14+
"publisher": "Integrating the Healthcare Enterprise (IHE)",
15+
"contact": [
16+
{
17+
"name": "IHE",
18+
"telecom": [
19+
{
20+
"system": "url",
21+
"value": "http://ihe.net"
22+
}
23+
]
24+
},
25+
{
26+
"name": "John Moehrke",
27+
"telecom": [
28+
{
29+
"system": "email",
30+
"value": "[email protected]"
31+
}
32+
]
33+
}
34+
],
35+
"description": "Profile on List for use as a Document Folder based on IHE IT Infrastructure Technical Framework Supplement - Mobile access to Health Documents (MHD) Rev. 2.3. See http://wiki.ihe.net/index.php/Mobile_access_to_Health_Documents_(MHD)",
36+
"copyright": "IHE http://www.ihe.net/Governance/#Intellectual_Property",
37+
"fhirVersion": "3.0.1",
38+
"kind": "resource",
39+
"abstract": false,
40+
"type": "List",
41+
"baseDefinition": "http://hl7.org/fhir/StructureDefinition/List",
42+
"derivation": "constraint",
43+
"differential": {
44+
"element": [
45+
{
46+
"id": "List.identifier",
47+
"path": "List.identifier",
48+
"comment": "When the List.identifier carries the entryUUID then the List.identifier.use shall be ‘official’; and the uniqueId then the List.identifier.use shall be\r\n‘usual’.",
49+
"min": 1
50+
},
51+
{
52+
"id": "List.mode",
53+
"path": "List.mode",
54+
"comment": "shall be ‘working’",
55+
"fixedCode": "working"
56+
},
57+
{
58+
"id": "List.title",
59+
"path": "List.title",
60+
"min": 1
61+
},
62+
{
63+
"id": "List.code",
64+
"path": "List.code",
65+
"comment": "code.coding is [0..*] so may contain many.",
66+
"min": 1
67+
},
68+
{
69+
"id": "List.subject",
70+
"path": "List.subject",
71+
"comment": "URL Points to an existing Patient resource representing Affinity Domain Patient.",
72+
"min": 1,
73+
"type": [
74+
{
75+
"code": "Reference",
76+
"targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
77+
}
78+
]
79+
},
80+
{
81+
"id": "List.encounter",
82+
"path": "List.encounter",
83+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
84+
"max": "0"
85+
},
86+
{
87+
"id": "List.source",
88+
"path": "List.source",
89+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
90+
"max": "0"
91+
},
92+
{
93+
"id": "List.orderedBy",
94+
"path": "List.orderedBy",
95+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
96+
"max": "0"
97+
},
98+
{
99+
"id": "List.entry.flag",
100+
"path": "List.entry.flag",
101+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
102+
"max": "0"
103+
},
104+
{
105+
"id": "List.entry.deleted",
106+
"path": "List.entry.deleted",
107+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
108+
"max": "0"
109+
},
110+
{
111+
"id": "List.entry.date",
112+
"path": "List.entry.date",
113+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
114+
"max": "0"
115+
},
116+
{
117+
"id": "List.emptyReason",
118+
"path": "List.emptyReason",
119+
"comment": "These HL7 FHIR STU3 elements are not used in XDS, therefore would not be present. Document Consumers should be robust to these elements holding values.",
120+
"max": "0"
121+
}
122+
]
123+
}
124+
}

0 commit comments

Comments
 (0)