private CodeableConcept readAsCodeableConcept(Element element) { CodeableConcept cc = new CodeableConcept(); List<Element> list = new ArrayList<Element>(); element.getNamedChildren("coding", list); for (Element item : list) cc.addCoding(readAsCoding(item)); cc.setText(element.getNamedChildValue("text")); return cc; }
public org.hl7.fhir.dstu3.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.instance.model.CodeableConcept src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.CodeableConcept tgt = new org.hl7.fhir.dstu3.model.CodeableConcept(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.Coding t : src.getCoding()) tgt.addCoding(convertCoding(t)); tgt.setText(src.getText()); return tgt; }
public CodeableConcept makeCodeableConceptFromCD(Element cv) throws Exception { if (cv == null) return null; CodeableConcept cc = new CodeableConcept(); cc.addCoding(makeCodingFromCV(cv)); for (Element e : cda.getChildren(cv, "translation")) cc.addCoding(makeCodingFromCV(e)); if (cda.getChild(cv, "originalText") != null) { Element ote = cda.getChild(cv, "originalText"); // if (cda.getChild(ote, "reference") != null) { // if (cda.getChild(ote, "reference").getAttribute("value").startsWith("#")) { // Element t = cda.getByXmlId(cda.getChild(ote, "reference").getAttribute("value").substring(1)); // String ot = t.getTextContent().trim(); // cc.setText(Utilities.noString(ot) ? null : ot); // } else // throw new Exception("external references not handled yet "+cda.getChild(ote, "reference").getAttribute("value")); // } else { String ot = ote.getTextContent().trim(); cc.setText(Utilities.noString(ot) ? null : ot); //} } return cc; }
public static org.hl7.fhir.dstu3.model.CodeableConcept convertCodeableConcept(org.hl7.fhir.dstu2016may.model.CodeableConcept src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.CodeableConcept tgt = new org.hl7.fhir.dstu3.model.CodeableConcept(); copyElement(src, tgt); for (org.hl7.fhir.dstu2016may.model.Coding t : src.getCoding()) tgt.addCoding(convertCoding(t)); if (src.hasText()) tgt.setText(src.getText()); return tgt; }
public CodeableConcept addProgramCode() { //3 CodeableConcept t = new CodeableConcept(); if (this.programCode == null) this.programCode = new ArrayList<CodeableConcept>(); this.programCode.add(t); return t; }
public CodeableConcept addModifier() { //3 CodeableConcept t = new CodeableConcept(); if (this.modifier == null) this.modifier = new ArrayList<CodeableConcept>(); this.modifier.add(t); return t; }
public CodeableConcept addAction() { //3 CodeableConcept t = new CodeableConcept(); if (this.action == null) this.action = new ArrayList<CodeableConcept>(); this.action.add(t); return t; }
public CodeableConcept addRole() { //3 CodeableConcept t = new CodeableConcept(); if (this.role == null) this.role = new ArrayList<CodeableConcept>(); this.role.add(t); return t; }
if (this.topic == null) this.topic = new ArrayList<CodeableConcept>(); this.topic.add(t); return t; } public ActivityDefinition addTopic(CodeableConcept t) { //3 if (t == null)
CodeableConcept cc = new CodeableConcept(); Coding c = new Coding(); c.setCode(cda.getChild(l, "languageCode").getAttribute("code"));
@Override public Base addChild(String name) throws FHIRException { if (name.equals("code")) { this.code = new CodeableConcept(); return this.code; } else if (name.equals("item")) { return addItem(); } else return super.addChild(name); }
/** * @return {@link #role} (Describes the type of performance or participation(e.g. primary surgeon, anaesthesiologiest, etc.).) */ public CodeableConcept getRole() { if (this.role == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create ChargeItemParticipantComponent.role"); else if (Configuration.doAutoCreate()) this.role = new CodeableConcept(); // cc return this.role; }
/** * @return {@link #type} (The component type as defined in the object-oriented or metric nomenclature partition.) */ public CodeableConcept getType() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DeviceComponent.type"); else if (Configuration.doAutoCreate()) this.type = new CodeableConcept(); // cc return this.type; }
/** * @return {@link #code} (Named anatomical location - ideally coded where possible.) */ public CodeableConcept getCode() { if (this.code == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create BodySite.code"); else if (Configuration.doAutoCreate()) this.code = new CodeableConcept(); // cc return this.code; }
/** * @return {@link #substance} (Identification of the specific substance (or pharmaceutical product) considered to be responsible for the Adverse Reaction event. Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'.) */ public CodeableConcept getSubstance() { if (this.substance == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AllergyIntoleranceReactionComponent.substance"); else if (Configuration.doAutoCreate()) this.substance = new CodeableConcept(); // cc return this.substance; }
/** * @return {@link #code} (Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g., "No known allergy", "No known drug allergies").) */ public CodeableConcept getCode() { if (this.code == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AllergyIntolerance.code"); else if (Configuration.doAutoCreate()) this.code = new CodeableConcept(); // cc return this.code; }
/** * @return {@link #subType} (Subtype of this Contract Provision, e.g. life time maximum payment for a contract term for specific valued item, e.g. disability payment.) */ public CodeableConcept getSubType() { if (this.subType == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create TermComponent.subType"); else if (Configuration.doAutoCreate()) this.subType = new CodeableConcept(); // cc return this.subType; }
/** * @return {@link #route} (How drug should enter body.) */ public CodeableConcept getRoute() { if (this.route == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Dosage.route"); else if (Configuration.doAutoCreate()) this.route = new CodeableConcept(); // cc return this.route; }
public static CodeableConcept readAsCodeableConcept(Element element) { CodeableConcept cc = new CodeableConcept(); List<Element> list = new ArrayList<Element>(); element.getNamedChildren("coding", list); for (Element item : list) cc.addCoding(readAsCoding(item)); cc.setText(element.getNamedChildValue("text")); return cc; }
tgt.setPrimarySource(!src.getReported()); if (src.hasPerformer()) tgt.addPractitioner().setActor(convertReference(src.getPerformer())).setRole(new org.hl7.fhir.dstu3.model.CodeableConcept().addCoding(new Coding().setSystem("http://hl7.org/fhir/v2/0443").setCode("AP"))); if (src.hasRequester()) tgt.addPractitioner().setActor(convertReference(src.getRequester())).setRole(new org.hl7.fhir.dstu3.model.CodeableConcept().addCoding(new Coding().setSystem("http://hl7.org/fhir/v2/0443").setCode("OP"))); tgt.setEncounter(convertReference(src.getEncounter())); tgt.setManufacturer(convertReference(src.getManufacturer()));