public org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.instance.model.Identifier src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier(); copyElement(src, tgt); tgt.setUse(convertIdentifierUse(src.getUse())); tgt.setType(convertCodeableConcept(src.getType())); tgt.setSystem(src.getSystem()); tgt.setValue(src.getValue()); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setAssigner(convertReference(src.getAssigner())); return tgt; }
public org.hl7.fhir.instance.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.instance.model.Identifier tgt = new org.hl7.fhir.instance.model.Identifier(); copyElement(src, tgt); if (src.hasUse()) tgt.setUse(convertIdentifierUse(src.getUse())); if (src.hasType()) tgt.setType(convertCodeableConcept(src.getType())); if (src.hasSystem()) tgt.setSystem(src.getSystem()); if (src.hasValue()) tgt.setValue(src.getValue()); if (src.hasPeriod()) tgt.setPeriod(convertPeriod(src.getPeriod())); if (src.hasAssigner()) tgt.setAssigner(convertReference(src.getAssigner())); return tgt; }
private Identifier readAsIdentifier(Element item) { Identifier r = new Identifier(); r.setSystem(item.getNamedChildValue("system")); r.setValue(item.getNamedChildValue("value")); return r; }
public static org.hl7.fhir.dstu2016may.model.Identifier convertIdentifier(org.hl7.fhir.dstu3.model.Identifier src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.Identifier tgt = new org.hl7.fhir.dstu2016may.model.Identifier(); copyElement(src, tgt); tgt.setUse(convertIdentifierUse(src.getUse())); tgt.setType(convertCodeableConcept(src.getType())); if (src.hasSystem()) tgt.setSystem(src.getSystem()); if (src.hasValue()) tgt.setValue(src.getValue()); tgt.setPeriod(convertPeriod(src.getPeriod())); tgt.setAssigner(convertReference(src.getAssigner())); return tgt; }
@Read() public Patient getResourceById(@IdParam IdType theId) { Patient retVal = new Patient(); // ...populate... retVal.addIdentifier().setSystem("urn:mrns").setValue("12345"); retVal.addName().setFamily("Smith").addGiven("Tester").addGiven("Q"); // ...etc... // if you know the version ID of the resource, you should set it and HAPI will // include it in a Content-Location header retVal.setId(new IdType("Patient", "123", "2")); return retVal; } //END SNIPPET: read
public static void setOID(ValueSet vs, String oid) { if (!oid.startsWith("urn:oid:")) oid = "urn:oid:" + oid; for (Identifier id : vs.getIdentifier()) { if ("urn:ietf:rfc:3986".equals(id.getSystem()) && id.hasValue() && id.getValue().startsWith("urn:oid:")) { id.setValue(oid); return; } } vs.addIdentifier().setSystem("urn:ietf:rfc:3986").setValue(oid); }
/** * Sets the DEA criterion. * * @param dea DEA. */ public void setDEA(String dea) { this.dea = new Identifier(); this.dea.setType(FhirTerminology.IDENT_DEA); this.dea.setValue(dea); }
public static boolean matches(Identifier i1, Identifier i2, MatchProfile profile) { if (profile != null) throw new NotImplementedException("Not Implemented Yet"); // in the absence of a profile, we ignore version return matches(i1.getSystem(), i2.getSystem(), null) && matches(i1.getValue(), i2.getValue(), null); }
@Override public void call(Row r) throws Exception { // Build the claim // --------------- // CLIENT_ID ....... 0 // CLIENT_SUB_ID ... 1 // CLAIM_SK ........ 2 // CLAIM_NBR ....... 3 // CLAIM_ADJ_CD,ADJ_FROM_CLAIM_SK,ADJ_FROM_CLAIM_NBR,ADJ_FROM_CLAIM_ADJ_NBR,CLAIM_STS_CD_SK,CLAIM_STS_CD,SYS_SUBSC_SK,SYS_SUBSC_ID,SYS_MBR_SK,SYS_MBR_ID,CLIENT_HIERARCHY_LVL1,CLIENT_HIERARCHY_LVL2,CLIENT_HIERARCHY_LVL3,CLIENT_HIERARCHY_LVL4,MBR_PCP_SK,MBR_PCP_NBR,PROV_SK,PROV_ID,PROV_TP_CD_SK,PROV_TP_CD,PAYEE_SK,PAYEE_ID,PAYEE_TIN,APPROVE_DAY_AMT,ACTUAL_DAY_AMT,CLAIM_BEG_SVC_DT,RECEIVE_DT,PAY_DT,DRG_CD_SK,DRG_CD,SUBMIT_DRG_CD_SK,SUBMIT_DRG_CD,BILL_CLASS_CD,FACILITY_TP_CD,HOSP_FREQ_CD,ADMIT_SRC_CD_SK,ADMIT_SRC_CD,ADMIT_TP_CD_SK,ADMIT_TP_CD,HOSP_ADMIT_DT,HOSP_ADMIT_HR,HOSP_DISCHARGE_DT,HOSP_DISCHARGE_HR,HOSP_DISCHARGE_STS_CD_SK,HOSP_DISCHARGE_STS_CD,ATTENDING_PROV_SK,ATTENDING_PROV_ID,PROV_ADDR_CD_SK,PROV_ADDR_CD,OOA_IND,EDI_REF_ID,CURRENT_IND,SENSTV_DRG_IND,CLIENT_SPECIFIC_TXT1,CLIENT_SPECIFIC_TXT2,CLIENT_SPECIFIC_TXT3,CLIENT_SPECIFIC_TXT4,CLIENT_SPECIFIC_TXT5,CLIENT_SPECIFIC_TXT6,CLIENT_SPECIFIC_TXT7,CLIENT_SPECIFIC_TXT8,CLIENT_SPECIFIC_TXT9,CLIENT_SPECIFIC_TXT10,REC_LOAD_DTTM,REC_LAST_UPD_DTTM,REC_DEL_IND,DRG_CODE_TP_CD,SUBMIT_DRG_CODE_TP_CD,QA_CURRENT_IND CodeableConcept cc = new CodeableConcept(); cc.setUserData("value", r.getString(3)); // TODO check that this is how // this valued is set here Identifier i = new Identifier(); i.setUse(IdentifierUse.OFFICIAL); i.setType(cc); i.setSystem("Payer Specific Claim Number"); i.setValue(r.getAs("CLAIM_NBR")); // TODO i.setAssigner(value); List<Identifier> identifiers = new ArrayList<>(); identifiers.add(i); Claim c = new Claim(); c.setIdentifier(identifiers); // Process/send the claim // ---------------------- // TODO } }
Element identifier = XMLUtil.getNamedChild(doc.getDocumentElement(), "Identifier"); vs.setPublisher(identifier.getAttribute("authority")); vs.addIdentifier(new Identifier().setValue(identifier.getAttribute("uid"))); List<Element> authors = new ArrayList<Element>(); XMLUtil.getNamedChildren(XMLUtil.getNamedChild(doc.getDocumentElement(), "Authors"), "Author", authors); identifier = XMLUtil.getNamedChild(doc.getDocumentElement(), "Identifier"); cs.setPublisher(identifier.getAttribute("authority")); cs.setIdentifier(new Identifier().setValue(identifier.getAttribute("uid"))); cs.setHierarchyMeaning(CodeSystemHierarchyMeaning.CLASSIFIEDWITH); authors = new ArrayList<Element>();
public Identifier addIdentifier() { //3 Identifier t = new Identifier(); if (this.identifier == null) this.identifier = new ArrayList<Identifier>(); this.identifier.add(t); return t; }
private void checkIdentifier(List<ValidationMessage> errors, String path, Element focus, Identifier fixed) { checkFixedValue(errors, path + ".use", focus.getNamedChild("use"), fixed.getUseElement(), "use", focus); checkFixedValue(errors, path + ".type", focus.getNamedChild("type"), fixed.getType(), "type", focus); checkFixedValue(errors, path + ".system", focus.getNamedChild("system"), fixed.getSystemElement(), "system", focus); checkFixedValue(errors, path + ".value", focus.getNamedChild("value"), fixed.getValueElement(), "value", focus); checkFixedValue(errors, path + ".period", focus.getNamedChild("period"), fixed.getPeriod(), "period", focus); checkFixedValue(errors, path + ".assigner", focus.getNamedChild("assigner"), fixed.getAssigner(), "assigner", focus); }
/** * Add a row containing the specified header (left column) and value (right column). * * @param header Text for header column * @param value Concept object */ protected void addRow(String header, Identifier value) { addRow(header, value == null ? "" : value.getValue().toString()); }
public static void merge(Identifier dst, Identifier src) { if (dst.getUseElement() == null && src.getUseElement() != null) dst.setUseElement(src.getUseElement()); if (dst.getType() == null && src.getType() != null) dst.setType(src.getType()); if (dst.getPeriod() == null && src.getPeriod() != null) dst.setPeriod(src.getPeriod()); if (dst.getAssigner() == null && src.getAssigner() != null) dst.setAssigner(src.getAssigner()); }
public boolean hasIdentifier() { if (this.identifier == null) return false; for (Identifier item : this.identifier) if (!item.isEmpty()) return true; return false; }
if (nextValue.isEmpty()) { continue; String system = StringUtils.defaultIfBlank(nextValue.getSystemElement().getValueAsString(), null); String value = nextValue.getValueElement().getValue(); if (isNotBlank(value)) { systems.add(system); if (isNotBlank(nextValue.getType().getText())) { addStringParam(theEntity, retVal, nextSpDef, nextValue.getType().getText());
public void clientRead() { //START SNIPPET: clientReadTags IPatientClient client = FhirContext.forDstu2().newRestfulClient(IPatientClient.class, "http://foo/fhir"); Patient patient = client.readPatient(new IdType("1234")); // Access the tag list List<Coding> tagList = patient.getMeta().getTag(); for (Coding next : tagList) { // ..process the tags somehow.. } //END SNIPPET: clientReadTags //START SNIPPET: clientCreateTags Patient newPatient = new Patient(); // Populate the resource object newPatient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setValue("123"); newPatient.addName().setFamily("Jones").addGiven("Frank"); // Populate some tags newPatient.getMeta().addTag("http://animals", "Dog", "Canine Patient"); // TODO: more realistic example newPatient.getMeta().addTag("http://personality", "Friendly", "Friendly"); // TODO: more realistic example // ...invoke the create method on the client... //END SNIPPET: clientCreateTags }
public Identifier copy() { Identifier dst = new Identifier(); copyValues(dst); dst.use = use == null ? null : use.copy(); dst.type = type == null ? null : type.copy(); dst.system = system == null ? null : system.copy(); dst.value = value == null ? null : value.copy(); dst.period = period == null ? null : period.copy(); dst.assigner = assigner == null ? null : assigner.copy(); return dst; }