Search in sources :

Example 51 with TestScript

use of org.hl7.fhir.r5.model.TestScript in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTestScriptTestScriptDestinationComponent.

protected void composeTestScriptTestScriptDestinationComponent(Complex parent, String parentType, String name, TestScript.TestScriptDestinationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "destination", name, element, index);
    if (element.hasIndexElement())
        composeInteger(t, "TestScript", "index", element.getIndexElement(), -1);
    if (element.hasProfile())
        composeCoding(t, "TestScript", "profile", element.getProfile(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 52 with TestScript

use of org.hl7.fhir.r5.model.TestScript in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTestScriptSetupActionOperationComponent.

protected void composeTestScriptSetupActionOperationComponent(Complex parent, String parentType, String name, TestScript.SetupActionOperationComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "operation", name, element, index);
    if (element.hasType())
        composeCoding(t, "TestScript", "type", element.getType(), -1);
    if (element.hasResourceElement())
        composeCode(t, "TestScript", "resource", element.getResourceElement(), -1);
    if (element.hasLabelElement())
        composeString(t, "TestScript", "label", element.getLabelElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "TestScript", "description", element.getDescriptionElement(), -1);
    if (element.hasAcceptElement())
        composeCode(t, "TestScript", "accept", element.getAcceptElement(), -1);
    if (element.hasContentTypeElement())
        composeCode(t, "TestScript", "contentType", element.getContentTypeElement(), -1);
    if (element.hasDestinationElement())
        composeInteger(t, "TestScript", "destination", element.getDestinationElement(), -1);
    if (element.hasEncodeRequestUrlElement())
        composeBoolean(t, "TestScript", "encodeRequestUrl", element.getEncodeRequestUrlElement(), -1);
    if (element.hasMethodElement())
        composeEnum(t, "TestScript", "method", element.getMethodElement(), -1);
    if (element.hasOriginElement())
        composeInteger(t, "TestScript", "origin", element.getOriginElement(), -1);
    if (element.hasParamsElement())
        composeString(t, "TestScript", "params", element.getParamsElement(), -1);
    for (int i = 0; i < element.getRequestHeader().size(); i++) composeTestScriptSetupActionOperationRequestHeaderComponent(t, "TestScript", "requestHeader", element.getRequestHeader().get(i), i);
    if (element.hasRequestIdElement())
        composeId(t, "TestScript", "requestId", element.getRequestIdElement(), -1);
    if (element.hasResponseIdElement())
        composeId(t, "TestScript", "responseId", element.getResponseIdElement(), -1);
    if (element.hasSourceIdElement())
        composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1);
    if (element.hasTargetIdElement())
        composeId(t, "TestScript", "targetId", element.getTargetIdElement(), -1);
    if (element.hasUrlElement())
        composeString(t, "TestScript", "url", element.getUrlElement(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 53 with TestScript

use of org.hl7.fhir.r5.model.TestScript in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTestScript.

protected void composeTestScript(Complex parent, String parentType, String name, TestScript element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "TestScript", name, element, index);
    if (element.hasUrlElement())
        composeUri(t, "TestScript", "url", element.getUrlElement(), -1);
    if (element.hasIdentifier())
        composeIdentifier(t, "TestScript", "identifier", element.getIdentifier(), -1);
    if (element.hasVersionElement())
        composeString(t, "TestScript", "version", element.getVersionElement(), -1);
    if (element.hasNameElement())
        composeString(t, "TestScript", "name", element.getNameElement(), -1);
    if (element.hasTitleElement())
        composeString(t, "TestScript", "title", element.getTitleElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "TestScript", "status", element.getStatusElement(), -1);
    if (element.hasExperimentalElement())
        composeBoolean(t, "TestScript", "experimental", element.getExperimentalElement(), -1);
    if (element.hasDateElement())
        composeDateTime(t, "TestScript", "date", element.getDateElement(), -1);
    if (element.hasPublisherElement())
        composeString(t, "TestScript", "publisher", element.getPublisherElement(), -1);
    for (int i = 0; i < element.getContact().size(); i++) composeContactDetail(t, "TestScript", "contact", element.getContact().get(i), i);
    if (element.hasDescriptionElement())
        composeMarkdown(t, "TestScript", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getUseContext().size(); i++) composeUsageContext(t, "TestScript", "useContext", element.getUseContext().get(i), i);
    for (int i = 0; i < element.getJurisdiction().size(); i++) composeCodeableConcept(t, "TestScript", "jurisdiction", element.getJurisdiction().get(i), i);
    if (element.hasPurposeElement())
        composeMarkdown(t, "TestScript", "purpose", element.getPurposeElement(), -1);
    if (element.hasCopyrightElement())
        composeMarkdown(t, "TestScript", "copyright", element.getCopyrightElement(), -1);
    for (int i = 0; i < element.getOrigin().size(); i++) composeTestScriptTestScriptOriginComponent(t, "TestScript", "origin", element.getOrigin().get(i), i);
    for (int i = 0; i < element.getDestination().size(); i++) composeTestScriptTestScriptDestinationComponent(t, "TestScript", "destination", element.getDestination().get(i), i);
    if (element.hasMetadata())
        composeTestScriptTestScriptMetadataComponent(t, "TestScript", "metadata", element.getMetadata(), -1);
    for (int i = 0; i < element.getFixture().size(); i++) composeTestScriptTestScriptFixtureComponent(t, "TestScript", "fixture", element.getFixture().get(i), i);
    for (int i = 0; i < element.getProfile().size(); i++) composeReference(t, "TestScript", "profile", element.getProfile().get(i), i);
    for (int i = 0; i < element.getVariable().size(); i++) composeTestScriptTestScriptVariableComponent(t, "TestScript", "variable", element.getVariable().get(i), i);
    if (element.hasSetup())
        composeTestScriptTestScriptSetupComponent(t, "TestScript", "setup", element.getSetup(), -1);
    for (int i = 0; i < element.getTest().size(); i++) composeTestScriptTestScriptTestComponent(t, "TestScript", "test", element.getTest().get(i), i);
    if (element.hasTeardown())
        composeTestScriptTestScriptTeardownComponent(t, "TestScript", "teardown", element.getTeardown(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 54 with TestScript

use of org.hl7.fhir.r5.model.TestScript in project org.hl7.fhir.core by hapifhir.

the class TurtleTests method test_testscript_example_rule.

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

Example 55 with TestScript

use of org.hl7.fhir.r5.model.TestScript in project org.hl7.fhir.core by hapifhir.

the class RdfParser method composeTestReport.

protected void composeTestReport(Complex parent, String parentType, String name, TestReport element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeDomainResource(t, "TestReport", name, element, index);
    if (element.hasIdentifier())
        composeIdentifier(t, "TestReport", "identifier", element.getIdentifier(), -1);
    if (element.hasNameElement())
        composeString(t, "TestReport", "name", element.getNameElement(), -1);
    if (element.hasStatusElement())
        composeEnum(t, "TestReport", "status", element.getStatusElement(), -1);
    if (element.hasTestScript())
        composeReference(t, "TestReport", "testScript", element.getTestScript(), -1);
    if (element.hasResultElement())
        composeEnum(t, "TestReport", "result", element.getResultElement(), -1);
    if (element.hasScoreElement())
        composeDecimal(t, "TestReport", "score", element.getScoreElement(), -1);
    if (element.hasTesterElement())
        composeString(t, "TestReport", "tester", element.getTesterElement(), -1);
    if (element.hasIssuedElement())
        composeDateTime(t, "TestReport", "issued", element.getIssuedElement(), -1);
    for (int i = 0; i < element.getParticipant().size(); i++) composeTestReportTestReportParticipantComponent(t, "TestReport", "participant", element.getParticipant().get(i), i);
    if (element.hasSetup())
        composeTestReportTestReportSetupComponent(t, "TestReport", "setup", element.getSetup(), -1);
    for (int i = 0; i < element.getTest().size(); i++) composeTestReportTestReportTestComponent(t, "TestReport", "test", element.getTest().get(i), i);
    if (element.hasTeardown())
        composeTestReportTestReportTeardownComponent(t, "TestReport", "teardown", element.getTeardown(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Aggregations

Complex (org.hl7.fhir.dstu2016may.formats.RdfGenerator.Complex)28 Complex (org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)28 Complex (org.hl7.fhir.r4.utils.formats.Turtle.Complex)18 Turtle (org.hl7.fhir.dstu3.utils.formats.Turtle)2 Test (org.junit.jupiter.api.Test)2 ArrayList (java.util.ArrayList)1 XmlParser (org.hl7.fhir.dstu3.formats.XmlParser)1 TestScriptTestComponent (org.hl7.fhir.dstu3.model.TestScript.TestScriptTestComponent)1 Arguments (org.junit.jupiter.params.provider.Arguments)1