ICD11 Generator support

This commit is contained in:
Grahame Grieve 2020-03-20 05:15:24 +11:00
parent 9e87161ec5
commit f732c7bf0c
1 changed files with 5 additions and 3 deletions

View File

@ -147,12 +147,14 @@ public class CodeSystemUtilities {
return isInactive(cs, def); return isInactive(cs, def);
} }
public static void defineCodeSystemProperty(CodeSystem cs, String code, String description, PropertyType type) { public static PropertyComponent defineCodeSystemProperty(CodeSystem cs, String code, String description, PropertyType type) {
for (PropertyComponent p : cs.getProperty()) { for (PropertyComponent p : cs.getProperty()) {
if (p.getCode().equals(code)) if (p.getCode().equals(code))
return; return p;
} }
cs.addProperty().setCode(code).setDescription(description).setType(type).setUri("http://hl7.org/fhir/concept-properties#"+code); PropertyComponent p = cs.addProperty();
p.setCode(code).setDescription(description).setType(type).setUri("http://hl7.org/fhir/concept-properties#"+code);
return p;
} }
public static String getCodeDefinition(CodeSystem cs, String code) { public static String getCodeDefinition(CodeSystem cs, String code) {