/** * Sets the identifier's type. This is a workaround for HAPI-FHIR's restrictive setter for this * property. * * @param identifier The identifier whose type is to be set. * @param code The identifier type. */ @SuppressWarnings("unchecked") public static void setIdentifierType(IdentifierDt identifier, CodeableConceptDt code) { identifier.setType((BoundCodeableConceptDt<IdentifierTypeCodesEnum>) code); }
/** * Sets the SSN criterion. * * @param ssn SSN. */ public void setSSN(String ssn) { this.ssn = new IdentifierDt("http://hl7.org/fhir/sid/us-ssn", ssn); this.ssn.setType(IdentifierTypeCodesEnum.SS); }
/** * Sets the value(s) for <b>type</b> () * * <p> * <b>Definition:</b> * A coded type for the identifier that can be used to determine which identifier to use for a specific purpose * </p> */ public IdentifierDt setType(IdentifierTypeCodesEnum theValue) { setType(new BoundCodeableConceptDt<IdentifierTypeCodesEnum>(IdentifierTypeCodesEnum.VALUESET_BINDER, theValue)); /* getType().setValueAsEnum(theValue); */ return this; }
/** * Sets the MRN criterion. * * @param mrn MRN. */ public void setMRN(String mrn) { this.mrn = new IdentifierDt(); this.mrn.setType(IdentifierTypeCodesEnum.MR); this.mrn.setValue(mrn); }
/** * Sets the SSN criterion. * * @param ssn SSN. */ public void setSSN(String ssn) { this.ssn = new IdentifierDt(); this.ssn.setType(IdentifierTypeCodesEnum.SS); this.ssn.setValue(ssn); this.ssn.setSystem("http://hl7.org/fhir/sid/us-ssn"); }
/** * Sets the DEA criterion. * * @param dea DEA. */ @SuppressWarnings("unchecked") public void setDEA(String dea) { this.dea = new IdentifierDt(); CodeableConceptDt type = new CodeableConceptDt(null, "DEA"); this.dea.setType((BoundCodeableConceptDt<IdentifierTypeCodesEnum>) type); this.dea.setValue(dea); }
patient1.getName().add(hnp.fromString(null, "Smith, Joe")); IdentifierDt ssn = new IdentifierDt(); ssn.setType(IdentifierTypeCodesEnum.SS); ssn.setValue("999-99-9999"); patient1.getIdentifier().add(ssn); patient2.getName().add(hnp.fromString(null, "Doe, Jane")); IdentifierDt ssn2 = new IdentifierDt(); ssn2.setType(IdentifierTypeCodesEnum.SS); ssn2.setValue("123-45-6789"); patient2.getIdentifier().add(ssn2);