Java Code Examples for org.hl7.fhir.r4.model.Identifier#setSystem()
The following examples show how to use
org.hl7.fhir.r4.model.Identifier#setSystem() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestData.java From bunsen with Apache License 2.0 | 6 votes |
/** * Returns a FHIR Observation for testing purposes. */ public static Observation newObservation() { // Observation based on https://www.hl7.org/FHIR/observation-example-bloodpressure.json.html Observation observation = new Observation(); observation.setId("blood-pressure"); Identifier identifier = observation.addIdentifier(); identifier.setSystem("urn:ietf:rfc:3986"); identifier.setValue("urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281"); observation.setStatus(Observation.ObservationStatus.FINAL); Quantity quantity = new Quantity(); quantity.setValue(new java.math.BigDecimal("123.45")); quantity.setUnit("mm[Hg]"); observation.setValue(quantity); return observation; }
Example 2
Source File: daoutilsR4.java From careconnect-reference-implementation with Apache License 2.0 | 6 votes |
public static Identifier getIdentifier(BaseIdentifier baseIdentifier, Identifier identifier) { if (baseIdentifier.getSystem() != null) identifier.setSystem(baseIdentifier.getSystem().getUri()); if (baseIdentifier.getValue() != null) identifier.setValue(baseIdentifier.getValue()); if (baseIdentifier.getUse() != null) { identifier.setUse(LibDaoR4.convertIdentifier(baseIdentifier.getIdentifierUse())); } if (baseIdentifier.getIdentifierType() != null) { identifier.getType() .addCoding() .setCode(baseIdentifier.getIdentifierType().getCode()) .setDisplay(baseIdentifier.getIdentifierType().getDisplay()) .setSystem(baseIdentifier.getIdentifierType().getSystem()); } return identifier; }
Example 3
Source File: FhirR4.java From synthea with Apache License 2.0 | 5 votes |
private static Identifier generateIdentifier(String uid) { Identifier identifier = new Identifier(); identifier.setUse(Identifier.IdentifierUse.OFFICIAL); identifier.setSystem("urn:ietf:rfc:3986"); identifier.setValue("urn:oid:" + uid); return identifier; }
Example 4
Source File: IContactHelper.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
public List<Identifier> getIdentifiers(IContact contact){ List<Identifier> ret = new ArrayList<>(); List<IXid> xids = xidService.getXids(contact); for (IXid xid : xids) { Identifier identifier = new Identifier(); identifier.setSystem(xid.getDomain()); identifier.setValue(xid.getDomainId()); ret.add(identifier); } return ret; }
Example 5
Source File: IPatientPatientAttributeMapper.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
private void mapIdentifiersAndPatientNumber(IPatient source, Patient target) { List<Identifier> identifiers = contactHelper.getIdentifiers(source); identifiers.add(getElexisObjectIdentifier(source)); String patNr = source.getPatientNr(); Identifier identifier = new Identifier(); identifier.setSystem(IdentifierSystem.ELEXIS_PATNR.getSystem()); identifier.setValue(patNr); identifiers.add(identifier); target.setIdentifier(identifiers); }
Example 6
Source File: ObjectConverter.java From org.hl7.fhir.core with Apache License 2.0 | 4 votes |
public static Identifier readAsIdentifier(Element item) { Identifier r = new Identifier(); r.setSystem(item.getNamedChildValue("system")); r.setValue(item.getNamedChildValue("value")); return r; }
Example 7
Source File: IFhirTransformer.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
default Identifier getElexisObjectIdentifier(Identifiable dbObject) { Identifier identifier = new Identifier(); identifier.setSystem(IdentifierSystem.ELEXIS_OBJID.getSystem()); identifier.setValue(dbObject.getId()); return identifier; }
Example 8
Source File: IPatientPatientAttributeMapper.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
private Identifier getElexisObjectIdentifier(Identifiable dbObject) { Identifier identifier = new Identifier(); identifier.setSystem(IdentifierSystem.ELEXIS_OBJID.getSystem()); identifier.setValue(dbObject.getId()); return identifier; }