use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeEligibilityRequest.
protected void composeEligibilityRequest(Complex parent, String parentType, String name, EligibilityRequest element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "EligibilityRequest", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "EligibilityRequest", "identifier", element.getIdentifier().get(i), i);
if (element.hasRuleset())
composeCoding(t, "EligibilityRequest", "ruleset", element.getRuleset(), -1);
if (element.hasOriginalRuleset())
composeCoding(t, "EligibilityRequest", "originalRuleset", element.getOriginalRuleset(), -1);
if (element.hasCreatedElement())
composeDateTime(t, "EligibilityRequest", "created", element.getCreatedElement(), -1);
if (element.hasTarget())
composeType(t, "EligibilityRequest", "target", element.getTarget(), -1);
if (element.hasProvider())
composeType(t, "EligibilityRequest", "provider", element.getProvider(), -1);
if (element.hasOrganization())
composeType(t, "EligibilityRequest", "organization", element.getOrganization(), -1);
if (element.hasPriority())
composeCoding(t, "EligibilityRequest", "priority", element.getPriority(), -1);
if (element.hasEnterer())
composeType(t, "EligibilityRequest", "enterer", element.getEnterer(), -1);
if (element.hasFacility())
composeType(t, "EligibilityRequest", "facility", element.getFacility(), -1);
if (element.hasPatient())
composeType(t, "EligibilityRequest", "patient", element.getPatient(), -1);
if (element.hasCoverage())
composeType(t, "EligibilityRequest", "coverage", element.getCoverage(), -1);
if (element.hasBusinessArrangementElement())
composeString(t, "EligibilityRequest", "businessArrangement", element.getBusinessArrangementElement(), -1);
if (element.hasServiced())
composeType(t, "EligibilityRequest", "serviced", element.getServiced(), -1);
if (element.hasBenefitCategory())
composeCoding(t, "EligibilityRequest", "benefitCategory", element.getBenefitCategory(), -1);
if (element.hasBenefitSubCategory())
composeCoding(t, "EligibilityRequest", "benefitSubCategory", element.getBenefitSubCategory(), -1);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePaymentNotice.
protected void composePaymentNotice(Complex parent, String parentType, String name, PaymentNotice element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "PaymentNotice", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "PaymentNotice", "identifier", element.getIdentifier().get(i), i);
if (element.hasRuleset())
composeCoding(t, "PaymentNotice", "ruleset", element.getRuleset(), -1);
if (element.hasOriginalRuleset())
composeCoding(t, "PaymentNotice", "originalRuleset", element.getOriginalRuleset(), -1);
if (element.hasCreatedElement())
composeDateTime(t, "PaymentNotice", "created", element.getCreatedElement(), -1);
if (element.hasTarget())
composeType(t, "PaymentNotice", "target", element.getTarget(), -1);
if (element.hasProvider())
composeType(t, "PaymentNotice", "provider", element.getProvider(), -1);
if (element.hasOrganization())
composeType(t, "PaymentNotice", "organization", element.getOrganization(), -1);
if (element.hasRequest())
composeType(t, "PaymentNotice", "request", element.getRequest(), -1);
if (element.hasResponse())
composeType(t, "PaymentNotice", "response", element.getResponse(), -1);
if (element.hasPaymentStatus())
composeCoding(t, "PaymentNotice", "paymentStatus", element.getPaymentStatus(), -1);
if (element.hasStatusDateElement())
composeDate(t, "PaymentNotice", "statusDate", element.getStatusDateElement(), -1);
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.
the class ProfileUtilitiesTests method testSlicingTask8742.
private void testSlicingTask8742() throws EOperationOutcome, Exception {
StructureDefinition focus = new StructureDefinition();
StructureDefinition base = context.fetchResource(StructureDefinition.class, "http://hl7.org/fhir/StructureDefinition/Organization").copy();
focus.setUrl(Utilities.makeUuidUrn());
focus.setBaseDefinition(base.getUrl());
focus.setType(base.getType());
focus.setDerivation(TypeDerivationRule.CONSTRAINT);
ElementDefinition id = focus.getDifferential().addElement();
id.setPath("Organization.address");
id.setMin(1);
id.setMax("1");
id.setMustSupport(true);
id = focus.getDifferential().addElement();
id.setPath("Organization.address.extension");
id.setSliceName("USLabCountycodes");
id.getSlicing().setOrdered(false).setRules(SlicingRules.OPEN).addDiscriminator().setPath("url").setType(DiscriminatorType.VALUE);
id.setShort("County/Parish FIPS codes");
id.setDefinition("County/Parish FIPS codes.");
id.setRequirements("County/Parish Code SHALL use FIPS 6-4 ( INCITS 31:2009).");
id.setMin(0);
id.setMax("1");
id.addType().setCode("Extension").setProfile("http://hl7.org/fhir/StructureDefinition/us-core-county");
id.setMustSupport(true);
id.getBinding().setStrength(BindingStrength.REQUIRED).setDescription("FIPS codes for US counties and county equivalent entities.").setValueSet(new Reference().setReference("http://hl7.org/fhir/ValueSet/fips-county"));
List<ValidationMessage> messages = new ArrayList<ValidationMessage>();
new ProfileUtilities(context, messages, null).generateSnapshot(base, focus, focus.getUrl(), "Simple Test");
// 14 for address with one sliced extension
boolean ok = base.getSnapshot().getElement().size() == focus.getSnapshot().getElement().size() - 13;
if (!ok) {
compareXml(base, focus);
throw new FHIRException("Snap shot generation test 8742 failed");
} else
System.out.println("Snap shot generation test 8742 passed");
}
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_f003_burgers_ENT.
@Test
public void test_organization_example_f003_burgers_ENT() throws FileNotFoundException, IOException, Exception {
System.out.println("organization-example-f003-burgers-ENT.ttl");
new Turtle().parse(TextFile.fileToString("C:\\work\\org.hl7.fhir\\build\\publish\\organization-example-f003-burgers-ENT.ttl"));
}
use of org.hl7.fhir.r4.model.codesystems.ResourceTypes.ORGANIZATION in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeConsent.
protected void composeConsent(Complex parent, String parentType, String name, Consent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "Consent", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Consent", "identifier", element.getIdentifier().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "Consent", "status", element.getStatusElement(), -1);
if (element.hasScope())
composeCodeableConcept(t, "Consent", "scope", element.getScope(), -1);
for (int i = 0; i < element.getCategory().size(); i++) composeCodeableConcept(t, "Consent", "category", element.getCategory().get(i), i);
if (element.hasPatient())
composeReference(t, "Consent", "patient", element.getPatient(), -1);
if (element.hasDateTimeElement())
composeDateTime(t, "Consent", "dateTime", element.getDateTimeElement(), -1);
for (int i = 0; i < element.getPerformer().size(); i++) composeReference(t, "Consent", "performer", element.getPerformer().get(i), i);
for (int i = 0; i < element.getOrganization().size(); i++) composeReference(t, "Consent", "organization", element.getOrganization().get(i), i);
if (element.hasSource())
composeType(t, "Consent", "source", element.getSource(), -1);
for (int i = 0; i < element.getPolicy().size(); i++) composeConsentConsentPolicyComponent(t, "Consent", "policy", element.getPolicy().get(i), i);
if (element.hasPolicyRule())
composeCodeableConcept(t, "Consent", "policyRule", element.getPolicyRule(), -1);
for (int i = 0; i < element.getVerification().size(); i++) composeConsentConsentVerificationComponent(t, "Consent", "verification", element.getVerification().get(i), i);
if (element.hasProvision())
composeConsentprovisionComponent(t, "Consent", "provision", element.getProvision(), -1);
}
Aggregations