Search in sources :

Example 36 with Endpoint

use of org.hl7.fhir.r4.model.Endpoint 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);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 37 with Endpoint

use of org.hl7.fhir.r4.model.Endpoint in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeSubscriptionSubscriptionChannelComponent.

protected void composeSubscriptionSubscriptionChannelComponent(Complex parent, String parentType, String name, Subscription.SubscriptionChannelComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "channel", name, element, index);
    if (element.hasTypeElement())
        composeEnum(t, "Subscription", "type", element.getTypeElement(), -1);
    if (element.hasEndpointElement())
        composeUrl(t, "Subscription", "endpoint", element.getEndpointElement(), -1);
    if (element.hasPayloadElement())
        composeCode(t, "Subscription", "payload", element.getPayloadElement(), -1);
    for (int i = 0; i < element.getHeader().size(); i++) composeString(t, "Subscription", "header", element.getHeader().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 38 with Endpoint

use of org.hl7.fhir.r4.model.Endpoint 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);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 39 with Endpoint

use of org.hl7.fhir.r4.model.Endpoint in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeInsurancePlan.

protected void composeInsurancePlan(Complex parent, String parentType, String name, InsurancePlan element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "InsurancePlan", name, element, index);
    for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "InsurancePlan", "identifier", element.getIdentifier().get(i), i);
    if (element.hasStatusElement())
        composeEnum(t, "InsurancePlan", "status", element.getStatusElement(), -1);
    for (int i = 0; i < element.getType().size(); i++) composeCodeableConcept(t, "InsurancePlan", "type", element.getType().get(i), i);
    if (element.hasNameElement())
        composeString(t, "InsurancePlan", "name", element.getNameElement(), -1);
    for (int i = 0; i < element.getAlias().size(); i++) composeString(t, "InsurancePlan", "alias", element.getAlias().get(i), i);
    if (element.hasPeriod())
        composePeriod(t, "InsurancePlan", "period", element.getPeriod(), -1);
    if (element.hasOwnedBy())
        composeReference(t, "InsurancePlan", "ownedBy", element.getOwnedBy(), -1);
    if (element.hasAdministeredBy())
        composeReference(t, "InsurancePlan", "administeredBy", element.getAdministeredBy(), -1);
    for (int i = 0; i < element.getCoverageArea().size(); i++) composeReference(t, "InsurancePlan", "coverageArea", element.getCoverageArea().get(i), i);
    for (int i = 0; i < element.getContact().size(); i++) composeInsurancePlanInsurancePlanContactComponent(t, "InsurancePlan", "contact", element.getContact().get(i), i);
    for (int i = 0; i < element.getEndpoint().size(); i++) composeReference(t, "InsurancePlan", "endpoint", element.getEndpoint().get(i), i);
    for (int i = 0; i < element.getNetwork().size(); i++) composeReference(t, "InsurancePlan", "network", element.getNetwork().get(i), i);
    for (int i = 0; i < element.getCoverage().size(); i++) composeInsurancePlanInsurancePlanCoverageComponent(t, "InsurancePlan", "coverage", element.getCoverage().get(i), i);
    for (int i = 0; i < element.getPlan().size(); i++) composeInsurancePlanInsurancePlanPlanComponent(t, "InsurancePlan", "plan", element.getPlan().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 40 with Endpoint

use of org.hl7.fhir.r4.model.Endpoint in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_endpoint_example.

@Test
public void test_endpoint_example() throws FileNotFoundException, IOException, Exception {
    System.out.println("endpoint-example.ttl");
    new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\endpoint-example.ttl"));
}
Also used : Turtle(org.hl7.fhir.dstu3.utils.formats.Turtle) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)36 Endpoint (org.hl7.fhir.dstu3.model.Endpoint)21 RequestDetails (ca.uhn.fhir.rest.api.server.RequestDetails)18 StringAndListParam (ca.uhn.fhir.rest.param.StringAndListParam)16 RestIntegrationTest (org.opencds.cqf.ruler.test.RestIntegrationTest)16 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)16 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)15 Endpoint (org.hl7.fhir.r4.model.Endpoint)15 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)14 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)14 Bundle (org.hl7.fhir.r4.model.Bundle)12 Organization (org.hl7.fhir.dstu3.model.Organization)11 Resource (org.hl7.fhir.r4.model.Resource)10 Resource (org.hl7.fhir.dstu3.model.Resource)9 Operation (ca.uhn.fhir.rest.annotation.Operation)7 List (java.util.List)7 Bundle (org.hl7.fhir.dstu3.model.Bundle)7 Description (ca.uhn.fhir.model.api.annotation.Description)6 MethodOutcome (ca.uhn.fhir.rest.api.MethodOutcome)6 ArrayList (java.util.ArrayList)6