use of org.hl7.fhir.r4.model.PractitionerRole in project integration-adaptor-111 by nhsconnect.
the class EncounterMapper method mapEncounter.
public Encounter mapEncounter(POCDMT000002UK01ClinicalDocument1 clinicalDocument, List<PractitionerRole> authorPractitionerRoles, Optional<PractitionerRole> responsibleParty, Coding interaction) {
Encounter encounter = new Encounter();
encounter.setIdElement(resourceUtil.newRandomUuid());
encounter.setStatus(FINISHED);
encounter.setLocation(getLocationComponents(clinicalDocument));
encounter.setPeriod(getPeriod(clinicalDocument));
setType(encounter, interaction);
setServiceProvider(encounter, clinicalDocument);
setIdentifiers(encounter, clinicalDocument);
setSubject(encounter, clinicalDocument);
encounter.setParticipant(getEncounterParticipantComponents(clinicalDocument, authorPractitionerRoles, responsibleParty, encounter));
setAppointment(encounter, clinicalDocument);
setEncounterReasonAndType(encounter, clinicalDocument);
return encounter;
}
use of org.hl7.fhir.r4.model.PractitionerRole in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePractitionerPractitionerPractitionerRoleComponent.
protected void composePractitionerPractitionerPractitionerRoleComponent(Complex parent, String parentType, String name, Practitioner.PractitionerPractitionerRoleComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "practitionerRole", name, element, index);
if (element.hasOrganization())
composeReference(t, "Practitioner", "organization", element.getOrganization(), -1);
if (element.hasRole())
composeCodeableConcept(t, "Practitioner", "role", element.getRole(), -1);
for (int i = 0; i < element.getSpecialty().size(); i++) composeCodeableConcept(t, "Practitioner", "specialty", element.getSpecialty().get(i), i);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Practitioner", "identifier", element.getIdentifier().get(i), i);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Practitioner", "telecom", element.getTelecom().get(i), i);
if (element.hasPeriod())
composePeriod(t, "Practitioner", "period", element.getPeriod(), -1);
for (int i = 0; i < element.getLocation().size(); i++) composeReference(t, "Practitioner", "location", element.getLocation().get(i), i);
for (int i = 0; i < element.getHealthcareService().size(); i++) composeReference(t, "Practitioner", "healthcareService", element.getHealthcareService().get(i), i);
}
use of org.hl7.fhir.r4.model.PractitionerRole in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePractitionerRolePractitionerRoleNotAvailableComponent.
protected void composePractitionerRolePractitionerRoleNotAvailableComponent(Complex parent, String parentType, String name, PractitionerRole.PractitionerRoleNotAvailableComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "notAvailable", name, element, index);
if (element.hasDescriptionElement())
composeString(t, "PractitionerRole", "description", element.getDescriptionElement(), -1);
if (element.hasDuring())
composePeriod(t, "PractitionerRole", "during", element.getDuring(), -1);
}
use of org.hl7.fhir.r4.model.PractitionerRole in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePractitionerRole.
protected void composePractitionerRole(Complex parent, String parentType, String name, PractitionerRole element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "PractitionerRole", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "PractitionerRole", "identifier", element.getIdentifier().get(i), i);
if (element.hasActiveElement())
composeBoolean(t, "PractitionerRole", "active", element.getActiveElement(), -1);
if (element.hasPeriod())
composePeriod(t, "PractitionerRole", "period", element.getPeriod(), -1);
if (element.hasPractitioner())
composeReference(t, "PractitionerRole", "practitioner", element.getPractitioner(), -1);
if (element.hasOrganization())
composeReference(t, "PractitionerRole", "organization", element.getOrganization(), -1);
for (int i = 0; i < element.getCode().size(); i++) composeCodeableConcept(t, "PractitionerRole", "code", element.getCode().get(i), i);
for (int i = 0; i < element.getSpecialty().size(); i++) composeCodeableConcept(t, "PractitionerRole", "specialty", element.getSpecialty().get(i), i);
for (int i = 0; i < element.getLocation().size(); i++) composeReference(t, "PractitionerRole", "location", element.getLocation().get(i), i);
for (int i = 0; i < element.getHealthcareService().size(); i++) composeReference(t, "PractitionerRole", "healthcareService", element.getHealthcareService().get(i), i);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "PractitionerRole", "telecom", element.getTelecom().get(i), i);
for (int i = 0; i < element.getAvailableTime().size(); i++) composePractitionerRolePractitionerRoleAvailableTimeComponent(t, "PractitionerRole", "availableTime", element.getAvailableTime().get(i), i);
for (int i = 0; i < element.getNotAvailable().size(); i++) composePractitionerRolePractitionerRoleNotAvailableComponent(t, "PractitionerRole", "notAvailable", element.getNotAvailable().get(i), i);
if (element.hasAvailabilityExceptionsElement())
composeString(t, "PractitionerRole", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1);
for (int i = 0; i < element.getEndpoint().size(); i++) composeReference(t, "PractitionerRole", "endpoint", element.getEndpoint().get(i), i);
}
use of org.hl7.fhir.r4.model.PractitionerRole in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePractitionerRolePractitionerRoleNotAvailableComponent.
protected void composePractitionerRolePractitionerRoleNotAvailableComponent(Complex parent, String parentType, String name, PractitionerRole.PractitionerRoleNotAvailableComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "notAvailable", name, element, index);
if (element.hasDescriptionElement())
composeString(t, "PractitionerRole", "description", element.getDescriptionElement(), -1);
if (element.hasDuring())
composePeriod(t, "PractitionerRole", "during", element.getDuring(), -1);
}
Aggregations