Add ability to create an implicit valueset for http://hl7.org/fhir/ValueSet/mimetypes

This commit is contained in:
James Agnew 2019-09-06 13:43:24 -04:00
parent 215fdae37f
commit cdfeec2ca9
1 changed files with 12 additions and 0 deletions

View File

@ -145,9 +145,21 @@ public class ValueSetUtilities {
return generateImplicitSnomedValueSet(uri);
if (uri.startsWith("http://loinc.org/vs"))
return generateImplicitLoincValueSet(uri);
if (uri.equals("http://hl7.org/fhir/ValueSet/mimetypes")) {
return generateImplicitMimetypesValueSet(uri);
}
return null;
}
private static ValueSet generateImplicitMimetypesValueSet(String theUri) {
ValueSet valueSet = new ValueSet();
valueSet.setUrl(theUri);
valueSet.setDescription("This value set includes all possible codes from BCP-13 (http://tools.ietf.org/html/bcp13)");
valueSet.getCompose()
.addInclude().setSystem("urn:ietf:bcp:13");
return valueSet;
}
private static ValueSet generateImplicitLoincValueSet(String uri) {
if ("http://loinc.org/vs".equals(uri))
return makeLoincValueSet();