Merge pull request #1187 from hapifhir/gg-202303-r5-final-gen

Gg 202303 r5 final gen
This commit is contained in:
Grahame Grieve 2023-03-24 11:50:23 +11:00 committed by GitHub
commit 37206a1f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 333 additions and 528 deletions

View File

@ -57,7 +57,6 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Meta40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Narrative40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.convertors.conv40_50.resources40_50.MarketingStatus40_50;
import org.hl7.fhir.convertors.conv40_50.resources40_50.Population40_50;
import org.hl7.fhir.convertors.conv40_50.resources40_50.ProdCharacteristic40_50;
import org.hl7.fhir.convertors.conv40_50.resources40_50.ProductShelfLife40_50;
import org.hl7.fhir.convertors.conv40_50.resources40_50.SubstanceAmount40_50;
@ -151,8 +150,6 @@ public class Type40_50 {
return ParameterDefinition40_50.convertParameterDefinition((org.hl7.fhir.r4.model.ParameterDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.Period)
return Period40_50.convertPeriod((org.hl7.fhir.r4.model.Period) src);
if (src instanceof org.hl7.fhir.r4.model.Population)
return Population40_50.convertPopulation((org.hl7.fhir.r4.model.Population) src);
if (src instanceof org.hl7.fhir.r4.model.ProdCharacteristic)
return ProdCharacteristic40_50.convertProdCharacteristic((org.hl7.fhir.r4.model.ProdCharacteristic) src);
if (src instanceof org.hl7.fhir.r4.model.ProductShelfLife)
@ -272,8 +269,6 @@ public class Type40_50 {
return ParameterDefinition40_50.convertParameterDefinition((org.hl7.fhir.r5.model.ParameterDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.Period)
return Period40_50.convertPeriod((org.hl7.fhir.r5.model.Period) src);
if (src instanceof org.hl7.fhir.r5.model.Population)
return Population40_50.convertPopulation((org.hl7.fhir.r5.model.Population) src);
if (src instanceof org.hl7.fhir.r5.model.ProdCharacteristic)
return ProdCharacteristic40_50.convertProdCharacteristic((org.hl7.fhir.r5.model.ProdCharacteristic) src);
if (src instanceof org.hl7.fhir.r5.model.ProductShelfLife)

View File

@ -1,32 +0,0 @@
package org.hl7.fhir.convertors.conv40_50.resources40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.BackboneElement40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
import org.hl7.fhir.exceptions.FHIRException;
public class Population40_50 {
public static org.hl7.fhir.r5.model.Population convertPopulation(org.hl7.fhir.r4.model.Population src) throws FHIRException {
if (src == null) return null;
org.hl7.fhir.r5.model.Population tgt = new org.hl7.fhir.r5.model.Population();
BackboneElement40_50.copyBackboneElement(src, tgt);
if (src.hasAge()) tgt.setAge(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAge()));
if (src.hasGender()) tgt.setGender(CodeableConcept40_50.convertCodeableConcept(src.getGender()));
if (src.hasRace()) tgt.setRace(CodeableConcept40_50.convertCodeableConcept(src.getRace()));
if (src.hasPhysiologicalCondition())
tgt.setPhysiologicalCondition(CodeableConcept40_50.convertCodeableConcept(src.getPhysiologicalCondition()));
return tgt;
}
public static org.hl7.fhir.r4.model.Population convertPopulation(org.hl7.fhir.r5.model.Population src) throws FHIRException {
if (src == null) return null;
org.hl7.fhir.r4.model.Population tgt = new org.hl7.fhir.r4.model.Population();
BackboneElement40_50.copyBackboneElement(src, tgt);
if (src.hasAge()) tgt.setAge(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getAge()));
if (src.hasGender()) tgt.setGender(CodeableConcept40_50.convertCodeableConcept(src.getGender()));
if (src.hasRace()) tgt.setRace(CodeableConcept40_50.convertCodeableConcept(src.getRace()));
if (src.hasPhysiologicalCondition())
tgt.setPhysiologicalCondition(CodeableConcept40_50.convertCodeableConcept(src.getPhysiologicalCondition()));
return tgt;
}
}

View File

@ -57,7 +57,6 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Meta43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Narrative43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
import org.hl7.fhir.convertors.conv43_50.resources43_50.MarketingStatus43_50;
import org.hl7.fhir.convertors.conv43_50.resources43_50.Population43_50;
import org.hl7.fhir.convertors.conv43_50.resources43_50.ProdCharacteristic43_50;
import org.hl7.fhir.convertors.conv43_50.resources43_50.ProductShelfLife43_50;
import org.hl7.fhir.convertors.conv43_50.resources43_50.SubstanceAmount43_50;
@ -151,8 +150,6 @@ public class Type43_50 {
return ParameterDefinition43_50.convertParameterDefinition((org.hl7.fhir.r4b.model.ParameterDefinition) src);
if (src instanceof org.hl7.fhir.r4b.model.Period)
return Period43_50.convertPeriod((org.hl7.fhir.r4b.model.Period) src);
if (src instanceof org.hl7.fhir.r4b.model.Population)
return Population43_50.convertPopulation((org.hl7.fhir.r4b.model.Population) src);
if (src instanceof org.hl7.fhir.r4b.model.ProdCharacteristic)
return ProdCharacteristic43_50.convertProdCharacteristic((org.hl7.fhir.r4b.model.ProdCharacteristic) src);
if (src instanceof org.hl7.fhir.r4b.model.ProductShelfLife)
@ -270,8 +267,6 @@ public class Type43_50 {
return ParameterDefinition43_50.convertParameterDefinition((org.hl7.fhir.r5.model.ParameterDefinition) src);
if (src instanceof org.hl7.fhir.r5.model.Period)
return Period43_50.convertPeriod((org.hl7.fhir.r5.model.Period) src);
if (src instanceof org.hl7.fhir.r5.model.Population)
return Population43_50.convertPopulation((org.hl7.fhir.r5.model.Population) src);
if (src instanceof org.hl7.fhir.r5.model.ProdCharacteristic)
return ProdCharacteristic43_50.convertProdCharacteristic((org.hl7.fhir.r5.model.ProdCharacteristic) src);
if (src instanceof org.hl7.fhir.r5.model.ProductShelfLife)

View File

@ -1,32 +0,0 @@
package org.hl7.fhir.convertors.conv43_50.resources43_50;
import org.hl7.fhir.convertors.context.ConversionContext43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.BackboneElement43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50;
import org.hl7.fhir.exceptions.FHIRException;
public class Population43_50 {
public static org.hl7.fhir.r5.model.Population convertPopulation(org.hl7.fhir.r4b.model.Population src) throws FHIRException {
if (src == null) return null;
org.hl7.fhir.r5.model.Population tgt = new org.hl7.fhir.r5.model.Population();
BackboneElement43_50.copyBackboneElement(src, tgt);
if (src.hasAge()) tgt.setAge(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getAge()));
if (src.hasGender()) tgt.setGender(CodeableConcept43_50.convertCodeableConcept(src.getGender()));
if (src.hasRace()) tgt.setRace(CodeableConcept43_50.convertCodeableConcept(src.getRace()));
if (src.hasPhysiologicalCondition())
tgt.setPhysiologicalCondition(CodeableConcept43_50.convertCodeableConcept(src.getPhysiologicalCondition()));
return tgt;
}
public static org.hl7.fhir.r4b.model.Population convertPopulation(org.hl7.fhir.r5.model.Population src) throws FHIRException {
if (src == null) return null;
org.hl7.fhir.r4b.model.Population tgt = new org.hl7.fhir.r4b.model.Population();
BackboneElement43_50.copyBackboneElement(src, tgt);
if (src.hasAge()) tgt.setAge(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getAge()));
if (src.hasGender()) tgt.setGender(CodeableConcept43_50.convertCodeableConcept(src.getGender()));
if (src.hasRace()) tgt.setRace(CodeableConcept43_50.convertCodeableConcept(src.getRace()));
if (src.hasPhysiologicalCondition())
tgt.setPhysiologicalCondition(CodeableConcept43_50.convertCodeableConcept(src.getPhysiologicalCondition()));
return tgt;
}
}

View File

@ -1,385 +0,0 @@
package org.hl7.fhir.r5.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, \
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this \
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, \
this list of conditions and the following disclaimer in the documentation \
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Wed, Mar 1, 2023 15:32+1100 for FHIR v5.0.0-draft-final
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.r5.model.Enumerations.*;
import org.hl7.fhir.instance.model.api.IBaseDatatypeElement;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.instance.model.api.ICompositeType;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Block;
/**
* Population Type: A populatioof people with some set of grouping criteria.
*/
@DatatypeDef(name="Population")
public class Population extends BackboneType implements ICompositeType {
/**
* The age of the specific population.
*/
@Child(name = "age", type = {Range.class, CodeableConcept.class}, order=0, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The age of the specific population", formalDefinition="The age of the specific population." )
protected DataType age;
/**
* The gender of the specific population.
*/
@Child(name = "gender", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The gender of the specific population", formalDefinition="The gender of the specific population." )
protected CodeableConcept gender;
/**
* Race of the specific population.
*/
@Child(name = "race", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="Race of the specific population", formalDefinition="Race of the specific population." )
protected CodeableConcept race;
/**
* The existing physiological conditions of the specific population to which this applies.
*/
@Child(name = "physiologicalCondition", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="The existing physiological conditions of the specific population to which this applies", formalDefinition="The existing physiological conditions of the specific population to which this applies." )
protected CodeableConcept physiologicalCondition;
private static final long serialVersionUID = -707090134L;
/**
* Constructor
*/
public Population() {
super();
}
/**
* @return {@link #age} (The age of the specific population.)
*/
public DataType getAge() {
return this.age;
}
/**
* @return {@link #age} (The age of the specific population.)
*/
public Range getAgeRange() throws FHIRException {
if (this.age == null)
this.age = new Range();
if (!(this.age instanceof Range))
throw new FHIRException("Type mismatch: the type Range was expected, but "+this.age.getClass().getName()+" was encountered");
return (Range) this.age;
}
public boolean hasAgeRange() {
return this != null && this.age instanceof Range;
}
/**
* @return {@link #age} (The age of the specific population.)
*/
public CodeableConcept getAgeCodeableConcept() throws FHIRException {
if (this.age == null)
this.age = new CodeableConcept();
if (!(this.age instanceof CodeableConcept))
throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.age.getClass().getName()+" was encountered");
return (CodeableConcept) this.age;
}
public boolean hasAgeCodeableConcept() {
return this != null && this.age instanceof CodeableConcept;
}
public boolean hasAge() {
return this.age != null && !this.age.isEmpty();
}
/**
* @param value {@link #age} (The age of the specific population.)
*/
public Population setAge(DataType value) {
if (value != null && !(value instanceof Range || value instanceof CodeableConcept))
throw new FHIRException("Not the right type for Population.age[x]: "+value.fhirType());
this.age = value;
return this;
}
/**
* @return {@link #gender} (The gender of the specific population.)
*/
public CodeableConcept getGender() {
if (this.gender == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Population.gender");
else if (Configuration.doAutoCreate())
this.gender = new CodeableConcept(); // cc
return this.gender;
}
public boolean hasGender() {
return this.gender != null && !this.gender.isEmpty();
}
/**
* @param value {@link #gender} (The gender of the specific population.)
*/
public Population setGender(CodeableConcept value) {
this.gender = value;
return this;
}
/**
* @return {@link #race} (Race of the specific population.)
*/
public CodeableConcept getRace() {
if (this.race == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Population.race");
else if (Configuration.doAutoCreate())
this.race = new CodeableConcept(); // cc
return this.race;
}
public boolean hasRace() {
return this.race != null && !this.race.isEmpty();
}
/**
* @param value {@link #race} (Race of the specific population.)
*/
public Population setRace(CodeableConcept value) {
this.race = value;
return this;
}
/**
* @return {@link #physiologicalCondition} (The existing physiological conditions of the specific population to which this applies.)
*/
public CodeableConcept getPhysiologicalCondition() {
if (this.physiologicalCondition == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create Population.physiologicalCondition");
else if (Configuration.doAutoCreate())
this.physiologicalCondition = new CodeableConcept(); // cc
return this.physiologicalCondition;
}
public boolean hasPhysiologicalCondition() {
return this.physiologicalCondition != null && !this.physiologicalCondition.isEmpty();
}
/**
* @param value {@link #physiologicalCondition} (The existing physiological conditions of the specific population to which this applies.)
*/
public Population setPhysiologicalCondition(CodeableConcept value) {
this.physiologicalCondition = value;
return this;
}
protected void listChildren(List<Property> children) {
super.listChildren(children);
children.add(new Property("age[x]", "Range|CodeableConcept", "The age of the specific population.", 0, 1, age));
children.add(new Property("gender", "CodeableConcept", "The gender of the specific population.", 0, 1, gender));
children.add(new Property("race", "CodeableConcept", "Race of the specific population.", 0, 1, race));
children.add(new Property("physiologicalCondition", "CodeableConcept", "The existing physiological conditions of the specific population to which this applies.", 0, 1, physiologicalCondition));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -1419716831: /*age[x]*/ return new Property("age[x]", "Range|CodeableConcept", "The age of the specific population.", 0, 1, age);
case 96511: /*age*/ return new Property("age[x]", "Range|CodeableConcept", "The age of the specific population.", 0, 1, age);
case 1442748286: /*ageRange*/ return new Property("age[x]", "Range", "The age of the specific population.", 0, 1, age);
case -1452658526: /*ageCodeableConcept*/ return new Property("age[x]", "CodeableConcept", "The age of the specific population.", 0, 1, age);
case -1249512767: /*gender*/ return new Property("gender", "CodeableConcept", "The gender of the specific population.", 0, 1, gender);
case 3492561: /*race*/ return new Property("race", "CodeableConcept", "Race of the specific population.", 0, 1, race);
case -62715190: /*physiologicalCondition*/ return new Property("physiologicalCondition", "CodeableConcept", "The existing physiological conditions of the specific population to which this applies.", 0, 1, physiologicalCondition);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 96511: /*age*/ return this.age == null ? new Base[0] : new Base[] {this.age}; // DataType
case -1249512767: /*gender*/ return this.gender == null ? new Base[0] : new Base[] {this.gender}; // CodeableConcept
case 3492561: /*race*/ return this.race == null ? new Base[0] : new Base[] {this.race}; // CodeableConcept
case -62715190: /*physiologicalCondition*/ return this.physiologicalCondition == null ? new Base[0] : new Base[] {this.physiologicalCondition}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 96511: // age
this.age = TypeConvertor.castToType(value); // DataType
return value;
case -1249512767: // gender
this.gender = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case 3492561: // race
this.race = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
case -62715190: // physiologicalCondition
this.physiologicalCondition = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("age[x]")) {
this.age = TypeConvertor.castToType(value); // DataType
} else if (name.equals("gender")) {
this.gender = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("race")) {
this.race = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("physiologicalCondition")) {
this.physiologicalCondition = TypeConvertor.castToCodeableConcept(value); // CodeableConcept
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1419716831: return getAge();
case 96511: return getAge();
case -1249512767: return getGender();
case 3492561: return getRace();
case -62715190: return getPhysiologicalCondition();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 96511: /*age*/ return new String[] {"Range", "CodeableConcept"};
case -1249512767: /*gender*/ return new String[] {"CodeableConcept"};
case 3492561: /*race*/ return new String[] {"CodeableConcept"};
case -62715190: /*physiologicalCondition*/ return new String[] {"CodeableConcept"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("ageRange")) {
this.age = new Range();
return this.age;
}
else if (name.equals("ageCodeableConcept")) {
this.age = new CodeableConcept();
return this.age;
}
else if (name.equals("gender")) {
this.gender = new CodeableConcept();
return this.gender;
}
else if (name.equals("race")) {
this.race = new CodeableConcept();
return this.race;
}
else if (name.equals("physiologicalCondition")) {
this.physiologicalCondition = new CodeableConcept();
return this.physiologicalCondition;
}
else
return super.addChild(name);
}
public String fhirType() {
return "Population";
}
public Population copy() {
Population dst = new Population();
copyValues(dst);
return dst;
}
public void copyValues(Population dst) {
super.copyValues(dst);
dst.age = age == null ? null : age.copy();
dst.gender = gender == null ? null : gender.copy();
dst.race = race == null ? null : race.copy();
dst.physiologicalCondition = physiologicalCondition == null ? null : physiologicalCondition.copy();
}
protected Population typedCopy() {
return copy();
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof Population))
return false;
Population o = (Population) other_;
return compareDeep(age, o.age, true) && compareDeep(gender, o.gender, true) && compareDeep(race, o.race, true)
&& compareDeep(physiologicalCondition, o.physiologicalCondition, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof Population))
return false;
Population o = (Population) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(age, gender, race, physiologicalCondition
);
}
}

View File

@ -339,18 +339,6 @@ public class TypeConvertor {
throw new FHIRException("Unable to convert a "+b.fhirType()+"("+b.getClass().getName()+") to a CodeableConcept");
}
public static Population castToPopulation(Base b) throws FHIRException {
if (b == null) {
return null;
}
if (b instanceof Population)
return (Population) b;
else
throw new FHIRException("Unable to convert a "+b.fhirType()+"("+b.getClass().getName()+") to a Population");
}
public static Coding castToCoding(Base b) throws FHIRException {
if (b == null) {
return null;

View File

@ -1,79 +1,43 @@
package org.hl7.fhir.r5.test.utils;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.apache.commons.codec.binary.Base64;
import org.fhir.ucum.UcumEssenceService;
import org.hl7.fhir.r5.context.IWorkerContext;
import org.hl7.fhir.r5.context.SimpleWorkerContext;
import org.hl7.fhir.r5.context.TerminologyCache;
import org.hl7.fhir.r5.model.Parameters;
import org.hl7.fhir.r5.utils.R5Hacker;
import org.hl7.fhir.utilities.CSFile;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.ToolGlobalSettings;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.npm.BasePackageCacheManager.InputStreamWithSrc;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.IPackageProvider;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.npm.ToolsVersion;
import org.hl7.fhir.utilities.tests.BaseTestingUtilities;
import org.hl7.fhir.utilities.tests.TestConfig;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import com.google.gson.JsonSyntaxException;
public class TestingUtilities extends BaseTestingUtilities {
public static class PackageProvider implements IPackageProvider {
@Override
public boolean handlesPackage(String id, String version) {
return id.equals("hl7.fhir.r5.core");
}
@Override
public InputStreamWithSrc provide(String id, String version) throws IOException {
return new InputStreamWithSrc(TestingUtilities.loadR5CorePackageSource(), "Test Case Repository", "5.0.0");
}
}
static public Map<String, IWorkerContext> fcontexts;
final static public String DEFAULT_CONTEXT_VERSION = "5.0.0";
@ -141,8 +105,12 @@ public class TestingUtilities extends BaseTestingUtilities {
}
}
private static NpmPackage loadR5CorePackage() throws IOException {
return NpmPackage.fromPackage(TestingUtilities.loadTestResourceStream("r5", "packages", "hl7.fhir.r5.core.tgz"));
public static NpmPackage loadR5CorePackage() throws IOException {
return NpmPackage.fromPackage(loadR5CorePackageSource());
}
private static InputStream loadR5CorePackageSource() throws IOException {
return TestingUtilities.loadTestResourceStream("r5", "packages", "hl7.fhir.r5.core.tgz");
}
public static String getTerminologyCacheDirectory() {
@ -203,5 +171,9 @@ public class TestingUtilities extends BaseTestingUtilities {
throw new Error("FHIR US directory not configured");
}
public static void injectCorePackageLoader() {
FilesystemPackageCacheManager.setPackageProvider(new TestingUtilities.PackageProvider());
}
}

View File

@ -165,7 +165,7 @@ public abstract class BasePackageCacheManager implements IPackageCacheManager {
}
}
public class InputStreamWithSrc {
public static class InputStreamWithSrc {
public InputStream stream;
public String url;

View File

@ -36,6 +36,7 @@ import org.hl7.fhir.utilities.json.model.JsonArray;
import org.hl7.fhir.utilities.json.model.JsonElement;
import org.hl7.fhir.utilities.json.model.JsonObject;
import org.hl7.fhir.utilities.json.parser.JsonParser;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager.IPackageProvider;
import org.hl7.fhir.utilities.npm.NpmPackage.NpmPackageFolder;
import org.hl7.fhir.utilities.npm.PackageList.PackageListEntry;
import org.slf4j.Logger;
@ -87,6 +88,14 @@ import org.slf4j.LoggerFactory;
public class FilesystemPackageCacheManager extends BasePackageCacheManager implements IPackageCacheManager {
// When running in testing mode, some packages are provided from the test case repository rather than by the normal means
// the PackageProvider is responsible for this. if no package provider is defined, or it declines to handle the package,
// then the normal means will be used
public interface IPackageProvider {
boolean handlesPackage(String id, String version);
InputStreamWithSrc provide(String id, String version) throws IOException;
}
private static IPackageProvider packageProvider;
// private static final String SECONDARY_SERVER = "http://local.fhir.org:8080/packages";
public static final String PACKAGE_REGEX = "^[a-zA-Z][A-Za-z0-9\\_\\-]*(\\.[A-Za-z0-9\\_\\-]+)+$";
@ -531,7 +540,9 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
// nup, don't have it locally (or it's expired)
FilesystemPackageCacheManager.InputStreamWithSrc source;
if ("current".equals(version) || (version!= null && version.startsWith("current$"))) {
if (packageProvider != null && packageProvider.handlesPackage(id, version)) {
source = packageProvider.provide(id, version);
} else if ("current".equals(version) || (version!= null && version.startsWith("current$"))) {
// special case - fetch from ci-build server
source = loadFromCIBuild(id, version.startsWith("current$") ? version.substring(8) : null);
} else {
@ -981,5 +992,13 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple
this.suppressErrors = suppressErrors;
}
public static IPackageProvider getPackageProvider() {
return packageProvider;
}
public static void setPackageProvider(IPackageProvider packageProvider) {
FilesystemPackageCacheManager.packageProvider = packageProvider;
}
}

View File

@ -101,6 +101,7 @@ public class ComparisonTests {
@ParameterizedTest(name = "{index}: id {0}")
@MethodSource("data")
public void test(String name, JsonObject content) throws Exception {
TestingUtilities.injectCorePackageLoader();
this.content = content;
if (content.has("use-test") && !content.get("use-test").getAsBoolean())

View File

@ -43,6 +43,7 @@ public class ResourceValidationTests {
private void runTest(String filename) throws IOException, FileNotFoundException, Exception {
TestingUtilities.injectCorePackageLoader();
if (val == null) {
ctxt = TestingUtilities.getSharedWorkerContext();
engine = TestUtilities.getValidationEngine("hl7.fhir.r5.core#5.0.0", ValidationEngineTests.DEF_TX, null, FhirPublication.R5, true, "5.0.0");

View File

@ -3,6 +3,8 @@ package org.hl7.fhir.validation.cli.services;
import org.apache.commons.io.IOUtils;
import org.hl7.fhir.r5.elementmodel.Manager;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.validation.ValidationEngine;
import org.hl7.fhir.validation.cli.model.CliContext;
import org.hl7.fhir.validation.cli.model.FileInfo;
@ -39,6 +41,7 @@ class ValidationServiceTest {
@Test
void validateSources() throws Exception {
TestingUtilities.injectCorePackageLoader();
SessionCache sessionCache = Mockito.spy(new SessionCache());
ValidationService myService = new ValidationService(sessionCache);

View File

@ -2,7 +2,7 @@ package org.hl7.fhir.validation.tests;
import java.io.File;
import org.hl7.fhir.r4.test.utils.TestingUtilities;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.validation.ValidatorCli;
import org.junit.jupiter.api.Disabled;
@ -13,6 +13,8 @@ public class TransformationTests {
@Test
public void testCCDA() throws Exception {
TestingUtilities.injectCorePackageLoader();
String mappings = Utilities.path(TestingUtilities.home(), "tests", "transform-examples", "ccda");
String input = Utilities.path(TestingUtilities.home(), "tests", "transform-examples", "ccda.xml");
String output = Utilities.path("[tmp]", "cda-bundle.txt");

View File

@ -137,6 +137,8 @@ public class ValidationTests implements IEvaluationContext, IValidatorResourceFe
@SuppressWarnings("deprecation")
@Test
public void test() throws Exception {
TestingUtilities.injectCorePackageLoader();
CacheVerificationLogger logger = new CacheVerificationLogger();
long setup = System.nanoTime();

View File

@ -1,6 +1,7 @@
package org.hl7.fhir.validation.tests.utilities;
import org.hl7.fhir.r5.context.TerminologyCache;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.utilities.FhirPublication;
import org.hl7.fhir.utilities.tests.TestConfig;
import org.hl7.fhir.utilities.tests.TestConstants;
@ -13,6 +14,7 @@ public class TestUtilities {
public static boolean silent = false;
public static ValidationEngine getValidationEngine(java.lang.String src, java.lang.String txServer, String txLog, FhirPublication version, boolean canRunWithoutTerminologyServer, java.lang.String vString) throws Exception {
TestingUtilities.injectCorePackageLoader();
final ValidationEngine validationEngine = new ValidationEngine.ValidationEngineBuilder()
.withCanRunWithoutTerminologyServer(canRunWithoutTerminologyServer)
@ -31,6 +33,7 @@ public class TestUtilities {
}
public static ValidationEngine getValidationEngine(java.lang.String src, java.lang.String txServer, FhirPublication version, java.lang.String vString) throws Exception {
TestingUtilities.injectCorePackageLoader();
final ValidationEngine validationEngine = new ValidationEngine.ValidationEngineBuilder()
.withVersion(vString)
.withUserAgent(TestConstants.USER_AGENT)

View File

@ -245,3 +245,79 @@ v: {
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "fr-CA"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "French (Canada)",
"code" : "fr-CA",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "439401001",
"display" : "Diagnosis"
}, "url": "http://hl7.org/fhir/ValueSet/condition-category", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
v: {
"display" : "Diagnosis (observable entity)",
"code" : "439401001",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "d"
}, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "天",
"code" : "d",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "text/plain"
}, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "text/plain",
"code" : "text/plain",
"system" : "urn:ietf:bcp:13"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "271649006",
"display" : "Systolic blood pressure"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "271649006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "nl-NL"
}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0", "lang":"nl-NL", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Dutch (Region=Netherlands)",
"code" : "nl-NL",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "en-AU"
}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0", "lang":"en-AU", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English (Region=Australia)",
"code" : "en-AU",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"code" : "en"
}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "English",
"code" : "en",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------

View File

@ -89,3 +89,23 @@ v: {
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "fr-CA"
}, "url": "http://hl7.org/fhir/ValueSet/all-languages--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "French (Region=Canada)",
"code" : "fr-CA",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "urn:ietf:bcp:47",
"code" : "fr-CA"
}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
v: {
"display" : "French (Region=Canada)",
"code" : "fr-CA",
"system" : "urn:ietf:bcp:47"
}
-------------------------------------------------------------------------------------

View File

@ -608,3 +608,110 @@ v: {
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "85354-9"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Blood pressure panel with all children optional",
"code" : "85354-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "85354-9",
"display" : "Blood pressure panel with all children optional"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Blood pressure panel with all children optional",
"code" : "85354-9",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8480-6",
"display" : "Systolic blood pressure"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Systolic blood pressure",
"code" : "8480-6",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "8462-4",
"display" : "Diastolic blood pressure"
}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Diastolic blood pressure",
"code" : "8462-4",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "56445-0"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "2.73",
"code" : "56445-0",
"display" : "Medication summary Doc"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"code" : "56445-0"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://loinc.org",
"version" : "current",
"code" : "56445-0",
"display" : "Medication summary Doc"
}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
v: {
"display" : "Medication summary Document",
"code" : "56445-0",
"system" : "http://loinc.org"
}
-------------------------------------------------------------------------------------

View File

@ -582,3 +582,63 @@ v: {
"error" : "The code provided (http://snomed.info/sct#106004) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "90655003"
}, "url": "http://hl7.org/fhir/ValueSet/c80-practice-codes--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"severity" : "error",
"error" : "The code provided (http://snomed.info/sct#90655003) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "24484000"
}, "url": "http://hl7.org/fhir/ValueSet/condition-severity--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}####
v: {
"display" : "Severe",
"code" : "24484000",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "24484000",
"display" : "Severe"
}, "url": "http://hl7.org/fhir/ValueSet/condition-severity", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}####
v: {
"display" : "Severe",
"code" : "24484000",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "109006"
}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "Anxiety disorder of childhood OR adolescence",
"code" : "109006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "109006",
"display" : "Anxiety disorder of childhood OR adolescence"
}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}####
v: {
"display" : "Anxiety disorder of childhood OR adolescence",
"code" : "109006",
"system" : "http://snomed.info/sct"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://snomed.info/sct",
"code" : "106004"
}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"severity" : "error",
"error" : "The code provided (http://snomed.info/sct#106004) is not valid (from http://tx.fhir.org/r4)"
}
-------------------------------------------------------------------------------------

View File

@ -119,3 +119,13 @@ v: {
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------
{"code" : {
"system" : "http://unitsofmeasure.org",
"code" : "mm[Hg]"
}, "url": "http://hl7.org/fhir/ValueSet/ucum-vitals-common--0", "version": "5.0.0", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}####
v: {
"display" : "millimeter of mercury",
"code" : "mm[Hg]",
"system" : "http://unitsofmeasure.org"
}
-------------------------------------------------------------------------------------