use of org.hl7.fhir.dstu3.model.HealthcareService in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeHealthcareServiceHealthcareServiceAvailableTimeComponent.
protected void composeHealthcareServiceHealthcareServiceAvailableTimeComponent(Complex parent, String parentType, String name, HealthcareService.HealthcareServiceAvailableTimeComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "availableTime", name, element, index);
for (int i = 0; i < element.getDaysOfWeek().size(); i++) composeEnum(t, "HealthcareService", "daysOfWeek", element.getDaysOfWeek().get(i), i);
if (element.hasAllDayElement())
composeBoolean(t, "HealthcareService", "allDay", element.getAllDayElement(), -1);
if (element.hasAvailableStartTimeElement())
composeTime(t, "HealthcareService", "availableStartTime", element.getAvailableStartTimeElement(), -1);
if (element.hasAvailableEndTimeElement())
composeTime(t, "HealthcareService", "availableEndTime", element.getAvailableEndTimeElement(), -1);
}
use of org.hl7.fhir.dstu3.model.HealthcareService in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeOrganizationAffiliation.
protected void composeOrganizationAffiliation(Complex parent, String parentType, String name, OrganizationAffiliation element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "OrganizationAffiliation", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "OrganizationAffiliation", "identifier", element.getIdentifier().get(i), i);
if (element.hasActiveElement())
composeBoolean(t, "OrganizationAffiliation", "active", element.getActiveElement(), -1);
if (element.hasPeriod())
composePeriod(t, "OrganizationAffiliation", "period", element.getPeriod(), -1);
if (element.hasOrganization())
composeReference(t, "OrganizationAffiliation", "organization", element.getOrganization(), -1);
if (element.hasParticipatingOrganization())
composeReference(t, "OrganizationAffiliation", "participatingOrganization", element.getParticipatingOrganization(), -1);
for (int i = 0; i < element.getNetwork().size(); i++) composeReference(t, "OrganizationAffiliation", "network", element.getNetwork().get(i), i);
for (int i = 0; i < element.getCode().size(); i++) composeCodeableConcept(t, "OrganizationAffiliation", "code", element.getCode().get(i), i);
for (int i = 0; i < element.getSpecialty().size(); i++) composeCodeableConcept(t, "OrganizationAffiliation", "specialty", element.getSpecialty().get(i), i);
for (int i = 0; i < element.getLocation().size(); i++) composeReference(t, "OrganizationAffiliation", "location", element.getLocation().get(i), i);
for (int i = 0; i < element.getHealthcareService().size(); i++) composeReference(t, "OrganizationAffiliation", "healthcareService", element.getHealthcareService().get(i), i);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "OrganizationAffiliation", "telecom", element.getTelecom().get(i), i);
for (int i = 0; i < element.getEndpoint().size(); i++) composeReference(t, "OrganizationAffiliation", "endpoint", element.getEndpoint().get(i), i);
}
use of org.hl7.fhir.dstu3.model.HealthcareService in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeHealthcareService.
protected void composeHealthcareService(Complex parent, String parentType, String name, HealthcareService element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "HealthcareService", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "HealthcareService", "identifier", element.getIdentifier().get(i), i);
if (element.hasActiveElement())
composeBoolean(t, "HealthcareService", "active", element.getActiveElement(), -1);
if (element.hasProvidedBy())
composeReference(t, "HealthcareService", "providedBy", element.getProvidedBy(), -1);
for (int i = 0; i < element.getCategory().size(); i++) composeCodeableConcept(t, "HealthcareService", "category", element.getCategory().get(i), i);
for (int i = 0; i < element.getType().size(); i++) composeCodeableConcept(t, "HealthcareService", "type", element.getType().get(i), i);
for (int i = 0; i < element.getSpecialty().size(); i++) composeCodeableConcept(t, "HealthcareService", "specialty", element.getSpecialty().get(i), i);
for (int i = 0; i < element.getLocation().size(); i++) composeReference(t, "HealthcareService", "location", element.getLocation().get(i), i);
if (element.hasNameElement())
composeString(t, "HealthcareService", "name", element.getNameElement(), -1);
if (element.hasCommentElement())
composeString(t, "HealthcareService", "comment", element.getCommentElement(), -1);
if (element.hasExtraDetailsElement())
composeMarkdown(t, "HealthcareService", "extraDetails", element.getExtraDetailsElement(), -1);
if (element.hasPhoto())
composeAttachment(t, "HealthcareService", "photo", element.getPhoto(), -1);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "HealthcareService", "telecom", element.getTelecom().get(i), i);
for (int i = 0; i < element.getCoverageArea().size(); i++) composeReference(t, "HealthcareService", "coverageArea", element.getCoverageArea().get(i), i);
for (int i = 0; i < element.getServiceProvisionCode().size(); i++) composeCodeableConcept(t, "HealthcareService", "serviceProvisionCode", element.getServiceProvisionCode().get(i), i);
for (int i = 0; i < element.getEligibility().size(); i++) composeHealthcareServiceHealthcareServiceEligibilityComponent(t, "HealthcareService", "eligibility", element.getEligibility().get(i), i);
for (int i = 0; i < element.getProgram().size(); i++) composeCodeableConcept(t, "HealthcareService", "program", element.getProgram().get(i), i);
for (int i = 0; i < element.getCharacteristic().size(); i++) composeCodeableConcept(t, "HealthcareService", "characteristic", element.getCharacteristic().get(i), i);
for (int i = 0; i < element.getCommunication().size(); i++) composeCodeableConcept(t, "HealthcareService", "communication", element.getCommunication().get(i), i);
for (int i = 0; i < element.getReferralMethod().size(); i++) composeCodeableConcept(t, "HealthcareService", "referralMethod", element.getReferralMethod().get(i), i);
if (element.hasAppointmentRequiredElement())
composeBoolean(t, "HealthcareService", "appointmentRequired", element.getAppointmentRequiredElement(), -1);
for (int i = 0; i < element.getAvailableTime().size(); i++) composeHealthcareServiceHealthcareServiceAvailableTimeComponent(t, "HealthcareService", "availableTime", element.getAvailableTime().get(i), i);
for (int i = 0; i < element.getNotAvailable().size(); i++) composeHealthcareServiceHealthcareServiceNotAvailableComponent(t, "HealthcareService", "notAvailable", element.getNotAvailable().get(i), i);
if (element.hasAvailabilityExceptionsElement())
composeString(t, "HealthcareService", "availabilityExceptions", element.getAvailabilityExceptionsElement(), -1);
for (int i = 0; i < element.getEndpoint().size(); i++) composeReference(t, "HealthcareService", "endpoint", element.getEndpoint().get(i), i);
}
use of org.hl7.fhir.dstu3.model.HealthcareService in project org.hl7.fhir.core by hapifhir.
the class TurtleTests method test_healthcareservice_example.
@Test
public void test_healthcareservice_example() throws FileNotFoundException, IOException, Exception {
System.out.println("healthcareservice-example.ttl");
new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\healthcareservice-example.ttl"));
}
use of org.hl7.fhir.dstu3.model.HealthcareService in project Gravity-SDOH-Exchange-RI by FHIR.
the class HealthcareServiceBundleToDtoConverter method convert.
@Override
public List<HealthcareServiceDto> convert(Bundle bundle) {
List<HealthcareService> services = FhirUtil.getFromBundle(bundle, HealthcareService.class);
List<HealthcareServiceDto> serviceDtos = new ArrayList<>(services.size());
for (HealthcareService s : services) {
HealthcareServiceDto dto = new HealthcareServiceDto(s.getIdElement().getIdPart());
dto.setLocations(new ArrayList<>());
dto.setName(s.getName());
for (Reference ref : s.getLocation()) {
if (!(ref.getResource() instanceof Location)) {
dto.getErrors().add(String.format("No Location resource was returned for reference %s", ref.getReference()));
} else {
dto.getLocations().add(locationToDtoConverter.convert((Location) ref.getResource()));
}
}
if (s.getLocation().isEmpty()) {
dto.getErrors().add(String.format("No Location resources are present for HealthcareService %s", s.getId()));
}
serviceDtos.add(dto);
}
return serviceDtos;
}
Aggregations