p.getModifierExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-planned", Factory.newBoolean(true), false)); p.getModifierExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-status", Factory.newCode(cda.getStatus(procedure)), false)); p.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-priority", convert.makeCodeableConceptFromCD(cda.getChild(procedure, "priorityCode")), false)); p.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-method", convert.makeCodeableConceptFromCD(cda.getChild(procedure, "methodCode")), false)); p.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/implanted-devices", Factory.makeReference(processDevice(participantRole, p)), false)); } else if (cda.hasTemplateId(participantRole, "2.16.840.1.113883.10.20.22.4.32")) { p.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/location", Factory.makeReference(processSDLocation(participantRole, p)), false)); Extension n = Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-instructions", null, true); n.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-instructions-type", convert.makeCodeableConceptFromCD(cda.getChild(a, "code")), false)); n.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/procedure-instructions-text", convert.makeStringFromED(cda.getChild(a, "text")), false)); p.getExtension().add(n); } else if (cda.hasTemplateId(a, "2.16.840.1.113883.10.20.22.4.19")) {
pat.setBirthDateElement(convert.makeDateFromTS(cda.getChild(p, "birthTime"))); pat.setMaritalStatus(convert.makeCodeableConceptFromCD(cda.getChild(p, "maritalStatusCode"))); pat.getExtension().add(Factory.newExtension(CcdaExtensions.NAME_RELIGION, convert.makeCodeableConceptFromCD(cda.getChild(p, "religiousAffiliationCode")), false)); pat.getExtension().add(Factory.newExtension(CcdaExtensions.DAF_NAME_RACE, convert.makeCodeableConceptFromCD(cda.getChild(p, "raceCode")), false)); pat.getExtension().add(Factory.newExtension(CcdaExtensions.DAF_NAME_ETHNICITY, convert.makeCodeableConceptFromCD(cda.getChild(p, "ethnicGroupCode")), false)); pat.getExtension().add(Factory.newExtension(CcdaExtensions.NAME_BIRTHPLACE, convert.makeAddressFromAD(cda.getChild(p, new String[] {"birthplace", "place", "addr"})), false)); cc.getExtension().add(Factory.newExtension(CcdaExtensions.NAME_LANG_PROF, convert.makeCodeableConceptFromCD(cda.getChild(l, "modeCode")), false)); pat.getExtension().add(Factory.newExtension(CcdaExtensions.NAME_RELIGION, convert.makeCodeableConceptFromCD(cda.getChild(p, "religiousAffiliationCode")), false)); pat.setManagingOrganization(Factory.makeReference(makeOrganization(cda.getChild(pr, "providerOrganization"), "Provider"))); return addReference(pat, "Subject", makeUUIDReference());
item.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/list-period", p, false)); if (p.getEnd() != null) item.setDate(p.getEnd()); ai.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/allergyintolerance-period", convert.makePeriodFromIVL(cda.getChild(obs, "effectiveTime")), false)); else if (ss.equals("59037007") || ss.equals("235719002")) ai.setType(AllergyIntoleranceType.INTOLERANCE); ai.getExtension().add(Factory.newExtension("http://www.healthintersections.com.au/fhir/extensions/allergy-category", type, false));
public static void addIdentifier(Element element, Identifier value) { element.getExtension().add(Factory.newExtension(EXT_IDENTIFIER, value, true)); }
public static void addVSComment(ConceptSetComponent nc, String comment) { if (!StringUtils.isBlank(comment)) nc.getExtension().add(Factory.newExtension(EXT_VS_COMMENT, Factory.newString_(comment), true)); } public static void addVSComment(ConceptReferenceComponent nc, String comment) {
public static void addDisplayHint(Element def, String hint) { if (!StringUtils.isBlank(hint)) def.getExtension().add(Factory.newExtension(EXT_DISPLAY_HINT, Factory.newString_(hint), true)); }
public static void addVSComment(ConceptReferenceComponent nc, String comment) { if (!StringUtils.isBlank(comment)) nc.getExtension().add(Factory.newExtension(EXT_VS_COMMENT, Factory.newString_(comment), true)); }
public static void addDefinition(Element nc, String definition) { if (!StringUtils.isBlank(definition)) nc.getExtension().add(Factory.newExtension(EXT_DEFINITION, Factory.newString_(definition), true)); }
public static void addCSComment(ConceptDefinitionComponent nc, String comment) { if (!StringUtils.isBlank(comment)) nc.getExtension().add(Factory.newExtension(EXT_CS_COMMENT, Factory.newString_(comment), true)); }
public static void addControl(QuestionnaireItemComponent group, String value) { group.getExtension().add(Factory.newExtension(EXT_CONTROL, Factory.newCodeableConcept(value, "http://hl7.org/fhir/questionnaire-item-control", value), true)); }
public static void addAllowedResource(QuestionnaireItemComponent group, String value) { group.getExtension().add(Factory.newExtension(EXT_ALLOWEDRESOURCE, Factory.newCode(value), true)); }
public static void addSubsumes(ConceptDefinitionComponent nc, String code) { nc.getModifierExtension().add(Factory.newExtension(EXT_SUBSUMES, Factory.newCode(code), true)); }
public static void addMin(QuestionnaireItemComponent item, int min) { item.getExtension().add(Factory.newExtension(EXT_MINOCCURS, Factory.newInteger(min), true)); }
public static void addReferenceFilter(QuestionnaireItemComponent group, String value) { group.getExtension().add(Factory.newExtension(EXT_REFERENCEFILTER, Factory.newString_(value), true)); }
public static void addFhirType(QuestionnaireItemComponent group, String value) { group.getExtension().add(Factory.newExtension(EXT_FHIRTYPE, Factory.newString_(value), true)); }
public static void addStringExtension(DomainResource e, String url, String content) { if (!StringUtils.isBlank(content)) { Extension ex = getExtension(e, url); if (ex != null) ex.setValue(new StringType(content)); else e.getExtension().add(Factory.newExtension(url, new StringType(content), true)); } }
public static void addStringExtension(Element e, String url, String content) { if (!StringUtils.isBlank(content)) { Extension ex = getExtension(e, url); if (ex != null) ex.setValue(new StringType(content)); else e.getExtension().add(Factory.newExtension(url, new StringType(content), true)); } }
public static void addMarkdownExtension(DomainResource dr, String url, String content) { if (!StringUtils.isBlank(content)) { Extension ex = getExtension(dr, url); if (ex != null) ex.setValue(new StringType(content)); else dr.getExtension().add(Factory.newExtension(url, new MarkdownType(content), true)); } }
public static void addFlyOver(QuestionnaireItemComponent item, String text){ if (!StringUtils.isBlank(text)) { QuestionnaireItemComponent display = item.addItem(); display.setType(QuestionnaireItemType.DISPLAY); display.setText(text); display.getExtension().add(Factory.newExtension(EXT_CONTROL, Factory.newCodeableConcept("flyover", "http://hl7.org/fhir/questionnaire-item-control", "Fly-over"), true)); } }
public static void addIntegerExtension(DomainResource dr, String url, int value) { Extension ex = getExtension(dr, url); if (ex != null) ex.setValue(new IntegerType(value)); else dr.getExtension().add(Factory.newExtension(url, new IntegerType(value), true)); }