Skip to content

Commit e5e1548

Browse files
authored
fix: Remove extension for Reason for Visit section (#94)
* rm reason for visit extension in composition * update snapshot tests for fhir converter api * update snapshot tests and validation num expected errors
1 parent 25d77fb commit e5e1548

File tree

9 files changed

+12
-90
lines changed

9 files changed

+12
-90
lines changed

data/Templates/eCR/Resource/_Composition.liquid

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -88,42 +88,6 @@
8888
{% include 'DataType/CodeableConcept' CodeableConcept: component.section.code -%}
8989
},
9090
"mode":"snapshot",
91-
{% if component.section.templateId.root and component.section.templateId.root == "2.16.840.1.113883.10.20.22.2.12" -%}
92-
{% assign tds = component.section | concatenate_tds -%}
93-
{% if component.section.text and component.section.text._ and component.section.text._ != null -%}
94-
"extension":
95-
[
96-
{
97-
"url" : "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
98-
"valueString" : "{{ component.section.text._ }}"
99-
},
100-
],
101-
{% elsif component.section.text and component.section.text.content and component.section.text.content._ != null -%}
102-
"extension":
103-
[
104-
{
105-
"url" : "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
106-
"valueString" : "{{ component.section.text.content._ }}"
107-
},
108-
],
109-
{% elsif component.section.text and component.section.text.paragraph._ and component.section.text.paragraph._ != null -%}
110-
"extension":
111-
[
112-
{
113-
"url" : "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
114-
"valueString" : "{{ component.section.text.paragraph._ }}"
115-
},
116-
],
117-
{% elsif tds and tds != '' -%}
118-
"extension":
119-
[
120-
{
121-
"url" : "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
122-
"valueString" : "{{ tds }}"
123-
},
124-
],
125-
{% endif -%}
126-
{% endif -%}
12791
"entry":
12892
[
12993
{% if component.section.templateId.root == "2.16.840.1.113883.10.20.22.2.38" or component.section.templateId[0].root == "2.16.840.1.113883.10.20.22.2.38" or component.section.templateId[0].root == "2.16.840.1.113883.10.20.22.2.44" %}

src/Dibbs.FhirConverterApi.FunctionalTests/__snapshots__/FhirConverterApiFunctionalTests.ConvertToFhir_ReturnsSuccess_WhenValidEicrWithRrProvided.snap

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,7 @@
180180
}
181181
]
182182
},
183-
"mode": "snapshot",
184-
"extension": [
185-
{
186-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
187-
"valueString": "No information"
188-
}
189-
]
183+
"mode": "snapshot"
190184
},
191185
{
192186
"id": "4f5e5135-21ef-80b6-9565-7c8879002754",

src/Dibbs.FhirConverterApi.FunctionalTests/__snapshots__/FhirConverterApiFunctionalTests.ConvertToFhir_ReturnsSuccess_WhenValidEicrWithoutRrProvided.snap

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,7 @@
180180
}
181181
]
182182
},
183-
"mode": "snapshot",
184-
"extension": [
185-
{
186-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
187-
"valueString": "No information"
188-
}
189-
]
183+
"mode": "snapshot"
190184
},
191185
{
192186
"id": "4f5e5135-21ef-80b6-9565-7c8879002754",

src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/BaseConvertDataFunctionalTests.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ public static IEnumerable<object[]> GetDataForEcr()
239239
// 4. whether the file should fail at parsing or validation when testing if valid (if it is fully valid, "validation" is what should be there)
240240
// 5. The number of expected failures at the step in (4)
241241
// ]
242-
new[] { @"EICR", @"eCR_full.xml", @"eCR_full-expected.json", "validation", "9" },
243-
new[] { @"EICR", @"eCR_RR_combined_3_1.xml", @"eCR_RR_combined_3_1-expected.json", "validation", "13" },
244-
new[] { @"EICR", @"eCR_EveEverywoman.xml", @"eCR_EveEverywoman-expected.json", "validation", "37" },
245-
new[] { @"EICR", @"eicr04152020.xml", @"eicr04152020-expected.json", "validation", "19" },
246-
new[] { @"EICR", @"CDAR2_IG_PHCASERPT_R2_D2_SAMPLE.xml", @"CDAR2_IG_PHCASERPT_R2_D2_SAMPLE-expected.json", "validation", "21" },
242+
new[] { @"EICR", @"eCR_full.xml", @"eCR_full-expected.json", "validation", "8" },
243+
new[] { @"EICR", @"eCR_RR_combined_3_1.xml", @"eCR_RR_combined_3_1-expected.json", "validation", "12" },
244+
new[] { @"EICR", @"eCR_EveEverywoman.xml", @"eCR_EveEverywoman-expected.json", "validation", "36" },
245+
new[] { @"EICR", @"eicr04152020.xml", @"eicr04152020-expected.json", "validation", "17" },
246+
new[] { @"EICR", @"CDAR2_IG_PHCASERPT_R2_D2_SAMPLE.xml", @"CDAR2_IG_PHCASERPT_R2_D2_SAMPLE-expected.json", "validation", "20" },
247247
};
248248
return data.Select(item => new[]
249249
{

src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/eCR/EICR/CDAR2_IG_PHCASERPT_R2_D2_SAMPLE-expected.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,7 @@
189189
}
190190
]
191191
},
192-
"mode": "snapshot",
193-
"extension": [
194-
{
195-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
196-
"valueString": "Dark stools"
197-
}
198-
]
192+
"mode": "snapshot"
199193
},
200194
{
201195
"id": "d887e17f-f7d9-15f6-24e0-73c549af07d6",

src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/eCR/EICR/eCR_EveEverywoman-expected.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,7 @@
212212
}
213213
]
214214
},
215-
"mode": "snapshot",
216-
"extension": [
217-
{
218-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
219-
"valueString": "Reason for Visit (as documented by provider): Headache, rash, and fever"
220-
}
221-
]
215+
"mode": "snapshot"
222216
},
223217
{
224218
"id": "f1cd3d12-56aa-80b7-f5df-4b4e2e11c689",

src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/eCR/EICR/eCR_RR_combined_3_1-expected.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,13 +348,7 @@
348348
}
349349
]
350350
},
351-
"mode": "snapshot",
352-
"extension": [
353-
{
354-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
355-
"valueString": "REMOVED"
356-
}
357-
]
351+
"mode": "snapshot"
358352
},
359353
{
360354
"id": "36C1EC28-DA66-11EF-B655-005056BE2511",

src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/eCR/EICR/eCR_full-expected.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,7 @@
159159
}
160160
]
161161
},
162-
"mode": "snapshot",
163-
"extension": [
164-
{
165-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
166-
"valueString": "recent travel for vacation to Wuhan China from April 22, 2020 to May 5, 2020 "
167-
}
168-
]
162+
"mode": "snapshot"
169163
},
170164
{
171165
"id": "59bb13bd-ad44-eedb-b5a7-8c0e56eff9df",

src/Microsoft.Health.Fhir.Liquid.Converter.FunctionalTests/TestData/Expected/eCR/EICR/eicr04152020-expected.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,7 @@
9999
}
100100
]
101101
},
102-
"mode": "snapshot",
103-
"extension": [
104-
{
105-
"url": "http://hl7.org/fhir/cda/ccda/StructureDefinition/2.16.840.1.113883.10.20.22.2.12",
106-
"valueString": "No Information Available"
107-
}
108-
]
102+
"mode": "snapshot"
109103
},
110104
{
111105
"id": "52ef27c7-0c59-eae8-5c4c-4912a793d7e0",

0 commit comments

Comments
 (0)