public org.hl7.fhir.dstu3.model.Coding convertEncounterClass(org.hl7.fhir.instance.model.Encounter.EncounterClass src) throws FHIRException { if (src == null) return null; switch (src) { case INPATIENT: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("IMP"); case OUTPATIENT: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("AMB"); case AMBULATORY: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("AMB"); case EMERGENCY: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("EMER"); case HOME: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("HH"); case FIELD: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("FLD"); case DAYTIME: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("SS"); case VIRTUAL: return new org.hl7.fhir.dstu3.model.Coding().setSystem("http://hl7.org/fhir/v3/ActCode").setCode("VR"); default: return null; } }
public Coding makeCodingFromCV(Element cd) throws Exception { if (cd == null || Utilities.noString(cd.getAttribute("code"))) return null; Coding c = new Coding(); c.setCode(cd.getAttribute("code")); c.setDisplay(cd.getAttribute("displayName")); String r = cd.getAttribute("codeSystem"); String uri = getUriForOID(r); if (uri != null) c.setSystem(uri); else if (isGuid(r)) c.setSystem("urn:uuid:"+r); else if (UriForOid(r) != null) c.setSystem(UriForOid(r)); else c.setSystem("urn:oid:"+r); return c; }
String s = getRubric(cls, "shortTitle"); if (s != null && !s.equals(concept.getDefinition())) concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("shortTitle")).setValue(s); s = getRubric(cls, "inclusion"); if (s != null) concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("inclusion")).setValue(s); s = getRubric(cls, "exclusion"); if (s != null) concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("exclusion")).setValue(s); s = getRubric(cls, "criteria"); if (s != null) concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("criteria")).setValue(s); s = getRubric(cls, "consider"); if (s != null) concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("consider")).setValue(s); s = getRubric(cls, "note"); if (s != null) concept.addDesignation().setUse(new Coding().setSystem("http://hl7.org/fhir/sid/icpc2/rubrics").setCode("note")).setValue(s);
private Coding readAsCoding(Element item) { Coding c = new Coding(); c.setSystem(item.getNamedChildValue("system")); c.setVersion(item.getNamedChildValue("version")); c.setCode(item.getNamedChildValue("code")); c.setDisplay(item.getNamedChildValue("display")); return c; }
public org.hl7.fhir.dstu3.model.Coding convertCoding(org.hl7.fhir.instance.model.Coding src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Coding tgt = new org.hl7.fhir.dstu3.model.Coding(); copyElement(src, tgt); tgt.setSystem(src.getSystem()); tgt.setVersion(src.getVersion()); tgt.setCode(src.getCode()); tgt.setDisplay(src.getDisplay()); tgt.setUserSelected(src.getUserSelected()); return tgt; }
public Coding addValueCoding() { //3 Coding t = new Coding(); if (this.valueCoding == null) this.valueCoding = new ArrayList<Coding>(); this.valueCoding.add(t); return t; }
public Coding addSecurityLabel() { //3 Coding t = new Coding(); if (this.securityLabel == null) this.securityLabel = new ArrayList<Coding>(); this.securityLabel.add(t); return t; }
public Coding addSubtype() { //3 Coding t = new Coding(); if (this.subtype == null) this.subtype = new ArrayList<Coding>(); this.subtype.add(t); return t; }
public Coding addCoding() { //3 Coding t = new Coding(); if (this.coding == null) this.coding = new ArrayList<Coding>(); this.coding.add(t); return t; }
public Coding addReason() { //3 Coding t = new Coding(); if (this.reason == null) this.reason = new ArrayList<Coding>(); this.reason.add(t); return t; }
public Bundle convert(InputStream stream) throws Exception { cda = new CDAUtilities(stream); doc = cda.getElement(); cda.checkTemplateId(doc, "2.16.840.1.113883.10.20.22.1.1"); convert = new Convert(cda, ucumSvc, "Z"); // check it's a CDA/CCD feed = new Bundle(); feed.setMeta(new Meta().setLastUpdatedElement(InstantType.now())); feed.setId(makeUUIDReference()); feed.getMeta().getTag().add(new Coding()); // todo-bundle ("http://hl7.org/fhir/tag", "http://hl7.org/fhir/tag/document", "Document")); // process the header makeDocument(); composition.setSubject(Factory.makeReference(makeSubject())); for (Element e : cda.getChildren(doc, "author")) composition.getAuthor().add(Factory.makeReference(makeAuthor(e))); // todo: data enterer & informant goes in provenance composition.setCustodian(Factory.makeReference(makeOrganization( cda.getDescendent(doc, "custodian/assignedCustodian/representedCustodianOrganization"), "Custodian"))); // todo: informationRecipient for (Element e : cda.getChildren(doc, "legalAuthenticator")) composition.getAttester().add(makeAttester(e, CompositionAttestationMode.LEGAL, "Legal Authenticator")); for (Element e : cda.getChildren(doc, "authenticator")) composition.getAttester().add(makeAttester(e, CompositionAttestationMode.PROFESSIONAL, "Authenticator")); // process the contents // we do this by section - keep the original section order Element body = cda.getDescendent(doc, "component/structuredBody"); processComponentSections(composition.getSection(), body); return feed; }
Coding c = new Coding(); c.setCode(cda.getChild(l, "languageCode").getAttribute("code")); cc.getCoding().add(c);
public static org.hl7.fhir.dstu3.model.Coding convertCoding(org.hl7.fhir.dstu2016may.model.Coding src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Coding tgt = new org.hl7.fhir.dstu3.model.Coding(); copyElement(src, tgt); if (src.hasSystem()) tgt.setSystem(src.getSystem()); if (src.hasVersion()) tgt.setVersion(src.getVersion()); if (src.hasCode()) tgt.setCode(src.getCode()); if (src.hasDisplay()) tgt.setDisplay(src.getDisplay()); if (src.hasUserSelected()) tgt.setUserSelected(src.getUserSelected()); return tgt; }
/** * @return {@link #reason} (For example, provides the reason for: the additional stay, or missing tooth or any other situation where a reason code is required in addition to the content.) */ public Coding getReason() { if (this.reason == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create SupportingInformationComponent.reason"); else if (Configuration.doAutoCreate()) this.reason = new Coding(); // cc return this.reason; }
/** * @return {@link #media} (Type of media involved. Used when the event is about exporting/importing onto media.) */ public Coding getMedia() { if (this.media == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AuditEventAgentComponent.media"); else if (Configuration.doAutoCreate()) this.media = new Coding(); // cc return this.media; }
/** * @return {@link #type} (The type of the object that was involved in this audit event.) */ public Coding getType() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AuditEventEntityComponent.type"); else if (Configuration.doAutoCreate()) this.type = new Coding(); // cc return this.type; }
/** * @return {@link #type} (Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function.) */ public Coding getType() { if (this.type == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create AuditEvent.type"); else if (Configuration.doAutoCreate()) this.type = new Coding(); // cc return this.type; }
/** * @return {@link #use} (Which kinds of designation to exclude from the expansion.) */ public Coding getUse() { if (this.use == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create DesignationExcludeDesignationComponent.use"); else if (Configuration.doAutoCreate()) this.use = new Coding(); // cc return this.use; }
/** * @return {@link #activity} (An activity is something that occurs over a period of time and acts upon or with entities; it may include consuming, processing, transforming, modifying, relocating, using, or generating entities.) */ public Coding getActivity() { if (this.activity == null) if (Configuration.errorOnAutoCreate()) throw new Error("Attempt to auto-create Provenance.activity"); else if (Configuration.doAutoCreate()) this.activity = new Coding(); // cc return this.activity; }
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()));