Skip to content

Commit cc75f30

Browse files
committed
Update ODH templates for validation
1 parent 8c90972 commit cc75f30

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

src/lib/ODHForm.svelte

+17-29
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
Col,
77
FormGroup,
88
Input,
9-
Label,
109
Row } from 'sveltestrap';
1110
1211
export let odhSection: any | undefined;
@@ -37,7 +36,7 @@
3736
"Clothier [Retail Salespersons]": "41-2031.00.008618",
3837
};
3938
let industries: Record<string,string> = {
40-
"Alcoholic beverage drinking places [Drinking Places (Alcoholic Beverages)": "722410.000378",
39+
"Alcoholic beverage drinking places [Drinking Places (Alcoholic Beverages)]": "722410.000378",
4140
"Home nursing services": "621610.008495",
4241
"Academies, college or university [Colleges, Universities, and Professional Schools]": "611310.000015",
4342
"Clothing stores, family [Family Clothing Stores]": "6448140.003510",
@@ -53,6 +52,7 @@
5352
let startCombat = canShare ? "2016-08" : "2016-08-01";
5453
let endCombat = canShare ? "2017-01" : "2017-01-01";
5554
55+
// Top-level ODH section template
5656
let odhSectionTemplate = {
5757
title: "History of Occupation",
5858
code: {
@@ -62,15 +62,15 @@
6262
code: "11341-5",
6363
display: "History of Occupation"
6464
}
65-
]
65+
]
6666
},
6767
entry: []
6868
};
6969
70+
// Present job resource template
7071
let currentJobTemplate = {
7172
resource: {
7273
resourceType: "Observation",
73-
id: "observation-odh-present-job-sample",
7474
meta: {
7575
versionId: "10",
7676
lastUpdated: "2021-05-27T09:19:44.894+00:00",
@@ -118,13 +118,13 @@
118118
}
119119
]
120120
},
121-
fullUrl: "observation-odh-present-job-sample"
121+
fullUrl: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f234"
122122
}
123123
124+
// Employment status resource template
124125
let employmentStatusTemplate = {
125126
resource: {
126127
resourceType: "Observation",
127-
id: "observation-odh-employment-status-sample",
128128
meta: {
129129
versionId: "7",
130130
lastUpdated: "2021-05-26T17:22:34.756+00:00",
@@ -133,12 +133,6 @@
133133
"http://hl7.org/fhir/us/odh/StructureDefinition/odh-EmploymentStatus"
134134
]
135135
},
136-
extension: [
137-
{
138-
url: "http://hl7.org/fhir/StructureDefinition/NarrativeLink",
139-
valueUri: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f233#HistoryOfOccupation-observation-odh-employment-status-sample"
140-
}
141-
],
142136
status: "final",
143137
code: {
144138
coding: [
@@ -162,13 +156,13 @@
162156
]
163157
}
164158
},
165-
fullUrl: "observation-odh-employment-status-sample"
159+
fullUrl: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f235"
166160
};
167161
162+
// Past job resource template
168163
let pastJobTemplate = {
169164
resource: {
170165
resourceType: "Observation",
171-
id: "observation-odh-past-job-sample",
172166
meta: {
173167
versionId: "10",
174168
lastUpdated: "2021-05-27T09:19:44.894+00:00",
@@ -216,13 +210,13 @@
216210
}
217211
]
218212
},
219-
fullUrl: "observation-odh-past-job-sample"
213+
fullUrl: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f236"
220214
}
221215
216+
// Retirement date resource template
222217
let retirementDateTemplate = {
223218
resource: {
224219
resourceType : "Observation",
225-
id : "observation-odh-retirement-date-sample",
226220
meta : {
227221
versionId : "1",
228222
lastUpdated : "2021-05-26T02:20:50.364+00:00",
@@ -246,13 +240,13 @@
246240
},
247241
valueDateTime : "2021-05-30"
248242
},
249-
fullUrl: "observation-odh-retirement-date-sample"
243+
fullUrl: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f237"
250244
};
251245
246+
// Combat zone period resource template
252247
let combatPeriodTemplate = {
253248
resource: {
254249
resourceType: "Observation",
255-
id: "observation-odh-combat-zone-period-sample",
256250
meta: {
257251
versionId: "2",
258252
lastUpdated: "2021-05-26T02:30:21.329+00:00",
@@ -261,12 +255,6 @@
261255
"http://hl7.org/fhir/us/odh/StructureDefinition/odh-CombatZonePeriod"
262256
]
263257
},
264-
extension: [
265-
{
266-
url: "http://hl7.org/fhir/StructureDefinition/NarrativeLink",
267-
valueUri: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f233#HistoryOfOccupation-observation-odh-combat-zone-period-sample"
268-
}
269-
],
270258
status: "final",
271259
code: {
272260
coding: [
@@ -285,7 +273,7 @@
285273
end: "2006-03-31"
286274
}
287275
},
288-
fullUrl: "observation-odh-combat-zone-period-sample"
276+
fullUrl: "urn:uuid:126e7704-b9dc-4559-ad88-138ad7a3f238"
289277
};
290278
291279
$: {
@@ -320,14 +308,14 @@
320308
}
321309
if (jobCurrent) {
322310
currentJob.resource.valueCodeableConcept.coding[0] = {
323-
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH",
311+
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH.html",
324312
code: jobs[jobCurrent],
325313
display: jobCurrent
326314
};
327315
}
328316
if (industryCurrent) {
329317
currentJob.resource.component[0].valueCodeableConcept.coding[0] = {
330-
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH",
318+
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH.html",
331319
code: industries[industryCurrent],
332320
display: industryCurrent
333321
};
@@ -350,14 +338,14 @@
350338
}
351339
if (jobPast) {
352340
pastJob.resource.valueCodeableConcept.coding[0] = {
353-
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH",
341+
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH.html",
354342
code: jobs[jobPast],
355343
display: jobPast
356344
};
357345
}
358346
if (industryPast) {
359347
pastJob.resource.component[0].valueCodeableConcept.coding[0] = {
360-
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH",
348+
system: "http://terminology.hl7.org/CodeSystem/PHOccupationalDataForHealthODH.html",
361349
code: industries[industryPast],
362350
display: industryPast
363351
};

0 commit comments

Comments
 (0)