makeshareable changes
This commit is contained in:
parent
fa7341ca44
commit
9bdd663497
|
@ -282,6 +282,16 @@ public class CodeSystemUtilities {
|
|||
return cs;
|
||||
}
|
||||
|
||||
public static boolean makeCSShareable(CodeSystem cs) {
|
||||
if (!cs.hasMeta())
|
||||
cs.setMeta(new Meta());
|
||||
for (UriType t : cs.getMeta().getProfile())
|
||||
if (t.getValue().equals("http://hl7.org/fhir/StructureDefinition/shareablecodesystem"))
|
||||
return false;
|
||||
cs.getMeta().getProfile().add(new CanonicalType("http://hl7.org/fhir/StructureDefinition/shareablecodesystem"));
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void setOID(CodeSystem cs, String oid) {
|
||||
if (!oid.startsWith("urn:oid:"))
|
||||
oid = "urn:oid:" + oid;
|
||||
|
|
|
@ -57,6 +57,16 @@ public class ValueSetUtilities {
|
|||
return vs;
|
||||
}
|
||||
|
||||
public static boolean makeVSShareable(ValueSet vs) {
|
||||
if (!vs.hasMeta())
|
||||
vs.setMeta(new Meta());
|
||||
for (UriType t : vs.getMeta().getProfile())
|
||||
if (t.getValue().equals("http://hl7.org/fhir/StructureDefinition/shareablevalueset"))
|
||||
return false;
|
||||
vs.getMeta().getProfile().add(new CanonicalType("http://hl7.org/fhir/StructureDefinition/shareablevalueset"));
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void checkShareable(ValueSet vs) {
|
||||
if (!vs.hasMeta())
|
||||
throw new Error("ValueSet "+vs.getUrl()+" is not shareable");
|
||||
|
|
Loading…
Reference in New Issue