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; }
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; }
private Meta toMeta(Collection<TagDefinition> tagDefinitions) { Meta retVal = new Meta(); for (TagDefinition next : tagDefinitions) { switch (next.getTagType()) { case PROFILE: retVal.addProfile(next.getCode()); break; case SECURITY_LABEL: retVal.addSecurity().setSystem(next.getSystem()).setCode(next.getCode()).setDisplay(next.getDisplay()); break; case TAG: retVal.addTag().setSystem(next.getSystem()).setCode(next.getCode()).setDisplay(next.getDisplay()); break; } } return retVal; }
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 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; }
/** * Convenience constructor * * @param theSystem The {@link #setSystem(String) code system} * @param theCode The {@link #setCode(String) code} * @param theDisplay The {@link #setDisplay(String) human readable display} */ public Coding(String theSystem, String theCode, String theDisplay) { setSystem(theSystem); setCode(theCode); setDisplay(theDisplay); } /**
/** * Convenience method which adds a security tag * * @param theSystem The code system * @param theCode The code * @param theDisplay The display name * @return Returns a reference to <code>this</code> for easy chaining */ public Meta addSecurity(String theSystem, String theCode, String theDisplay) { addSecurity().setSystem(theSystem).setCode(theCode).setDisplay(theDisplay); return this; } /**
/** * Convenience method which adds a tag * * @param theSystem The code system * @param theCode The code * @param theDisplay The display name * @return Returns a reference to <code>this</code> for easy chaining */ public Meta addTag(String theSystem, String theCode, String theDisplay) { addTag().setSystem(theSystem).setCode(theCode).setDisplay(theDisplay); return this; } /**
public static CodeableConcept createServiceCategory(String sc, String shortDx, String longDx) { CodeableConcept cpt = new CodeableConcept(); cpt.setText(longDx); Coding coding = new Coding(); coding.setCode(sc); coding.setDisplay(shortDx); cpt.getCoding().add(coding); return cpt; }
public static CodeableConcept newCodeableConcept(String code, String system, String display) { CodeableConcept cc = new CodeableConcept(); Coding c = new Coding(); c.setCode(code); c.setSystem(system); c.setDisplay(display); cc.getCoding().add(c); return cc; }
public static Coding makeCoding(String code) throws FHIRException { String[] parts = code.split("\\|"); Coding c = new Coding(); if (parts.length == 2) { c.setSystem(parts[0]); c.setCode(parts[1]); } else if (parts.length == 3) { c.setSystem(parts[0]); c.setCode(parts[1]); c.setDisplay(parts[2]); } else throw new FHIRException("Unable to understand the code '"+code+"'. Use the format system|code(|display)"); return c; }
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; }
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 static 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; }
private Meta toMeta(Collection<TagDefinition> tagDefinitions) { Meta retVal = new Meta(); for (TagDefinition next : tagDefinitions) { switch (next.getTagType()) { case PROFILE: retVal.addProfile(next.getCode()); break; case SECURITY_LABEL: retVal.addSecurity().setSystem(next.getSystem()).setCode(next.getCode()).setDisplay(next.getDisplay()); break; case TAG: retVal.addTag().setSystem(next.getSystem()).setCode(next.getCode()).setDisplay(next.getDisplay()); break; } } return retVal; }
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; }
private static synchronized void loadServiceCategories() { if (serviceCategories == null) { Map<String, CodeableConcept> map = new LinkedHashMap<>(); Bundle bundle = ClientUtil.getFhirClient().search().forResource(ValueSet.class) .where(CodeSystem.NAME.matchesExactly().value("EncounterType")).returnBundle(Bundle.class).execute(); for (CodeSystem cs : FhirUtil.getEntries(bundle, CodeSystem.class)) { UriType system = cs.getUrlElement(); for (ConceptDefinitionComponent concept : cs.getConcept()) { CodeableConcept cc = new CodeableConcept(); Coding coding = cc.addCoding(); coding.setCode(concept.getCode()); coding.setDisplay(concept.getDisplay()); coding.setSystemElement(system); cc.setText(concept.getDefinition()); map.put(coding.getCode(), cc); } } serviceCategories = map; } return; }
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; }
if (vr != null && vr.getDisplay() != null) display = vr.getDisplay(); return new Coding().setSystem(system).setCode(code).setDisplay(display);
.setSystem("http://ihe.net/connectathon/classCodes") .setCode("History and Physical") .setDisplay("History and Physical"); reference.addContent() .setAttachment(