Fix for issue #373, and all other convertor methods that contain this same error. (#379)

This commit is contained in:
Mark Iantorno 2020-11-24 09:28:05 -05:00 committed by GitHub
parent 7e5a670846
commit d45f8ae1a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 28970 additions and 32692 deletions

View File

@ -0,0 +1,27 @@
package org.hl7.fhir.convertors.conv10_30;
import org.hl7.fhir.convertors.VersionConvertorAdvisor30;
import org.hl7.fhir.convertors.VersionConvertor_10_30;
import org.hl7.fhir.convertors.loaders.R2ToR3Loader;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.io.IOException;
import java.io.InputStream;
import java.util.stream.Stream;
public class AdministrativeGender10_30Test {
@Test
@DisplayName("Test 10_30 extension present, value is not")
public void testMedicationRequestConversion() throws IOException {
InputStream dstu2_input = this.getClass().getResourceAsStream("/administrative_gender_null.json");
org.hl7.fhir.dstu2.model.Patient dstu2 = (org.hl7.fhir.dstu2.model.Patient) new org.hl7.fhir.dstu2.formats.JsonParser().parse(dstu2_input);
VersionConvertorAdvisor30 advisor = new R2ToR3Loader();
org.hl7.fhir.dstu3.model.Resource stu_actual = VersionConvertor_10_30.convertResource(dstu2, advisor);
}
}

View File

@ -0,0 +1,94 @@
{
"resourceType": "Patient",
"id": "12743884",
"meta": {
"versionId": "0",
"lastUpdated": "2020-09-15T06:35:01.000Z"
},
"text": {
"status": "generated",
"div": "<div><p><b>Patient</b></p><p><b>Name</b>: Dawg, Joel</p><p><b>DOB</b>: Nov 11, 1991</p><p><b>Status</b>: Active</p></div>"
},
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://hl7.org/fhir/v2/0203",
"code": "MR",
"display": "Medical record number",
"userSelected": false
}
],
"text": "MRN"
},
"system": "urn:oid:2.16.840.1.113883.6.1000",
"value": "7690",
"_value": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/rendered-value",
"valueString": "00000007690"
}
]
},
"period": {
"start": "2020-09-15T06:35:01.000Z"
}
},
{
"use": "usual",
"type": {
"text": "Military Id"
},
"system": "urn:oid:2.16.840.1.113883.3.42.10001.100001.12",
"value": "10050007740",
"_value": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/rendered-value",
"valueString": "10050007740"
}
]
},
"period": {
"start": "2020-09-15T06:35:01.000Z"
}
}
],
"active": true,
"name": [
{
"use": "official",
"text": "Dawg, Joel",
"family": [
"Dawg"
],
"given": [
"Joel"
]
}
],
"telecom": [
{
"system": "phone",
"value": "3075557575",
"use": "home"
},
{
"system": "email",
"value": "amitabhp@mindfiresolutions.com",
"use": "work"
}
],
"_gender": {
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode": "unknown"
}
]
},
"birthDate": "1991-11-11"
}