public static Reference readAsReference(Element item) { Reference r = new Reference(); r.setDisplay(item.getNamedChildValue("display")); r.setReference(item.getNamedChildValue("reference")); r.setType(item.getNamedChildValue("type")); List<Element> identifier = item.getChildrenByName("identifier"); if (identifier.isEmpty() == false) { r.setIdentifier(readAsIdentifier(identifier.get(0))); } return r; }
public org.hl7.fhir.r4.model.Reference convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Reference tgt = convertReference(src.getRef()); copyElement(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifier())); return tgt; }
public org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); copyElement(src, tgt); tgt.setSite(src.getSite()); if (src.hasIdentifier()) tgt.getObserver().setIdentifier(convertIdentifier(src.getIdentifier())); for (org.hl7.fhir.instance.model.Coding t : src.getType()) tgt.addType(convertCoding(t)); return tgt; }
public org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent(); copyElement(src, tgt); if (src.hasIdentifier()) tgt.getWhat().setIdentifier(convertIdentifier(src.getIdentifier())); if (src.hasReference()) tgt.setWhat(convertReference(src.getReference())); tgt.setType(convertCoding(src.getType())); tgt.setRole(convertCoding(src.getRole())); tgt.setLifecycle(convertCoding(src.getLifecycle())); for (org.hl7.fhir.instance.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(convertCoding(t)); tgt.setName(src.getName()); tgt.setDescription(src.getDescription()); tgt.setQuery(src.getQuery()); for (org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); return tgt; }
public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) tgt.addRole(convertCodeableConcept(t)); tgt.setWho(convertReference(src.getReference())); if (src.hasUserId()) tgt.getWho().setIdentifier(convertIdentifier(src.getUserId())); tgt.setAltId(src.getAltId()); tgt.setName(src.getName()); tgt.setRequestor(src.getRequestor()); tgt.setLocation(convertReference(src.getLocation())); for (org.hl7.fhir.instance.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); tgt.setMedia(convertCoding(src.getMedia())); tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); for (org.hl7.fhir.instance.model.Coding t : src.getPurposeOfUse()) tgt.addPurposeOfUse().addCoding(convertCoding(t)); return tgt; }
public static Reference readAsReference(Element item) { Reference r = new Reference(); r.setDisplay(item.getNamedChildValue("display")); r.setReference(item.getNamedChildValue("reference")); r.setType(item.getNamedChildValue("type")); List<Element> identifier = item.getChildrenByName("identifier"); if (identifier.isEmpty() == false) { r.setIdentifier(readAsIdentifier(identifier.get(0))); } return r; }
public org.hl7.fhir.r4.model.Reference convertDocumentReferenceContextRelatedComponent(org.hl7.fhir.instance.model.DocumentReference.DocumentReferenceContextRelatedComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Reference tgt = convertReference(src.getRef()); copyElement(src, tgt); tgt.setIdentifier(convertIdentifier(src.getIdentifier())); return tgt; }
protected AuditEvent.AuditEventSourceComponent auditSourceIdentificationToEventSource(AuditSourceIdentificationType asit) { AuditEvent.AuditEventSourceComponent source = new AuditEvent.AuditEventSourceComponent() .setSite(asit.getAuditEnterpriseSiteID()) .setObserver(new Reference().setIdentifier(new Identifier().setValue(asit.getAuditSourceID()))); asit.getAuditSourceType().forEach(ast -> source.addType(codedValueTypeToCoding(ast))); return source; }
public org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent convertAuditEventSourceComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventSourceComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); copyElement(src, tgt); tgt.setSite(src.getSite()); if (src.hasIdentifier()) tgt.getObserver().setIdentifier(convertIdentifier(src.getIdentifier())); for (org.hl7.fhir.instance.model.Coding t : src.getType()) tgt.addType(convertCoding(t)); return tgt; }
protected AuditEvent.AuditEventAgentComponent activeParticipantToAgent(ActiveParticipantType ap) { AuditEvent.AuditEventAgentComponent agent = new AuditEvent.AuditEventAgentComponent() .setWho(new Reference().setIdentifier(new Identifier().setValue(ap.getUserID()))) .setAltId(ap.getAlternativeUserID()) .setName(ap.getUserName()) .setRequestor(ap.isUserIsRequestor()) .setMedia(codedValueTypeToCoding(ap.getMediaType())) .setNetwork(new AuditEvent.AuditEventAgentNetworkComponent() .setAddress(ap.getNetworkAccessPointID()) .setType(auditEventNetworkType(ap.getNetworkAccessPointTypeCode()))); ap.getRoleIDCodes().forEach(roleID -> agent.addPolicy(roleID.getCode())); return agent; }
protected AuditEvent.AuditEventEntityComponent participantObjectIdentificationToEntity(ParticipantObjectIdentificationType poit) { AuditEvent.AuditEventEntityComponent entity = new AuditEvent.AuditEventEntityComponent() .setWhat(new Reference().setIdentifier(new Identifier() .setValue(poit.getParticipantObjectID()))) // poit.getParticipantObjectIDTypeCode())) not used here .setType(new Coding() .setCode(String.valueOf(poit.getParticipantObjectTypeCode().getValue())) .setSystem("http://hl7.org/fhir/audit-entity-type")) .setRole(new Coding() .setCode(String.valueOf(poit.getParticipantObjectTypeCodeRole().getValue())) .setSystem("http://hl7.org/fhir/object-role")) .setLifecycle(new Coding() .setCode(String.valueOf(poit.getParticipantObjectDataLifeCycle().getValue())) .setSystem("http://hl7.org/fhir/dicom-audit-lifecycle")) .addSecurityLabel(new Coding() .setCode(poit.getParticipantObjectSensitivity())) .setName(poit.getParticipantObjectName()) // poit.getParticipantObjectDescription) not mappable here .setQuery(poit.getParticipantObjectQuery()); poit.getParticipantObjectDetails().forEach(tvp -> entity.addDetail(new AuditEvent.AuditEventEntityDetailComponent() .setType(tvp.getType()) .setValue(new Base64BinaryType(tvp.getValue())))); return entity; }
public org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent convertAuditEventEntityComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityComponent(); copyElement(src, tgt); if (src.hasIdentifier()) tgt.getWhat().setIdentifier(convertIdentifier(src.getIdentifier())); if (src.hasReference()) tgt.setWhat(convertReference(src.getReference())); tgt.setType(convertCoding(src.getType())); tgt.setRole(convertCoding(src.getRole())); tgt.setLifecycle(convertCoding(src.getLifecycle())); for (org.hl7.fhir.instance.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(convertCoding(t)); tgt.setName(src.getName()); tgt.setDescription(src.getDescription()); tgt.setQuery(src.getQuery()); for (org.hl7.fhir.instance.model.AuditEvent.AuditEventObjectDetailComponent t : src.getDetail()) tgt.addDetail(convertAuditEventEntityDetailComponent(t)); return tgt; }
public org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent convertAuditEventAgentComponent(org.hl7.fhir.instance.model.AuditEvent.AuditEventParticipantComponent src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentComponent(); copyElement(src, tgt); for (org.hl7.fhir.instance.model.CodeableConcept t : src.getRole()) tgt.addRole(convertCodeableConcept(t)); tgt.setWho(convertReference(src.getReference())); if (src.hasUserId()) tgt.getWho().setIdentifier(convertIdentifier(src.getUserId())); tgt.setAltId(src.getAltId()); tgt.setName(src.getName()); tgt.setRequestor(src.getRequestor()); tgt.setLocation(convertReference(src.getLocation())); for (org.hl7.fhir.instance.model.UriType t : src.getPolicy()) tgt.addPolicy(t.getValue()); tgt.setMedia(convertCoding(src.getMedia())); tgt.setNetwork(convertAuditEventAgentNetworkComponent(src.getNetwork())); for (org.hl7.fhir.instance.model.Coding t : src.getPurposeOfUse()) tgt.addPurposeOfUse().addCoding(convertCoding(t)); return tgt; }