Search in sources :

Example 66 with ORGANIZATION

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION 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 67 with ORGANIZATION

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeVerificationResultVerificationResultValidatorComponent.

protected void composeVerificationResultVerificationResultValidatorComponent(Complex parent, String parentType, String name, VerificationResult.VerificationResultValidatorComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "validator", name, element, index);
    if (element.hasOrganization())
        composeReference(t, "VerificationResult", "organization", element.getOrganization(), -1);
    if (element.hasIdentityCertificateElement())
        composeString(t, "VerificationResult", "identityCertificate", element.getIdentityCertificateElement(), -1);
    if (element.hasAttestationSignature())
        composeSignature(t, "VerificationResult", "attestationSignature", element.getAttestationSignature(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 68 with ORGANIZATION

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composePatientContactComponent.

protected void composePatientContactComponent(Complex parent, String parentType, String name, Patient.ContactComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "contact", name, element, index);
    for (int i = 0; i < element.getRelationship().size(); i++) composeCodeableConcept(t, "Patient", "relationship", element.getRelationship().get(i), i);
    if (element.hasName())
        composeHumanName(t, "Patient", "name", element.getName(), -1);
    for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i);
    if (element.hasAddress())
        composeAddress(t, "Patient", "address", element.getAddress(), -1);
    if (element.hasGenderElement())
        composeEnum(t, "Patient", "gender", element.getGenderElement(), -1);
    if (element.hasOrganization())
        composeReference(t, "Patient", "organization", element.getOrganization(), -1);
    if (element.hasPeriod())
        composePeriod(t, "Patient", "period", element.getPeriod(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 69 with ORGANIZATION

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_organization_example_f203_bumc.

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

Example 70 with ORGANIZATION

use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_organization_example_f002_burgers_card.

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

Aggregations

Test (org.junit.jupiter.api.Test)101 Organization (org.hl7.fhir.dstu3.model.Organization)90 Organization (org.hl7.fhir.r4.model.Organization)69 BundleEntryComponent (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent)41 Resource (org.hl7.fhir.r4.model.Resource)38 ArrayList (java.util.ArrayList)34 List (java.util.List)33 Reference (org.hl7.fhir.r4.model.Reference)33 Identifier (org.hl7.fhir.r4.model.Identifier)30 Bundle (org.hl7.fhir.dstu3.model.Bundle)27 UUID (java.util.UUID)26 IGenericClient (ca.uhn.fhir.rest.client.api.IGenericClient)25 Patient (org.hl7.fhir.r4.model.Patient)25 IdType (org.hl7.fhir.dstu3.model.IdType)24 Bundle (org.hl7.fhir.r4.model.Bundle)24 Coding (org.hl7.fhir.r4.model.Coding)24 CodeableConcept (org.hl7.fhir.r4.model.CodeableConcept)19 ContactPoint (org.hl7.fhir.r4.model.ContactPoint)17 Reference (org.hl7.fhir.dstu3.model.Reference)16 IBaseResource (org.hl7.fhir.instance.model.api.IBaseResource)16