Search in sources :

Example 31 with TestScript

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

the class RdfParser method composeTestScriptSetupActionComponent.

protected void composeTestScriptSetupActionComponent(Complex parent, String parentType, String name, TestScript.SetupActionComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "action", name, element, index);
    if (element.hasOperation())
        composeTestScriptSetupActionOperationComponent(t, "TestScript", "operation", element.getOperation(), -1);
    if (element.hasAssert())
        composeTestScriptSetupActionAssertComponent(t, "TestScript", "assert", element.getAssert(), -1);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 32 with TestScript

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

the class RdfParser method composeTestScriptTestScriptSetupComponent.

protected void composeTestScriptTestScriptSetupComponent(Complex parent, String parentType, String name, TestScript.TestScriptSetupComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "setup", name, element, index);
    for (int i = 0; i < element.getAction().size(); i++) composeTestScriptSetupActionComponent(t, "TestScript", "action", element.getAction().get(i), i);
}
Also used : Complex(org.hl7.fhir.r4.utils.formats.Turtle.Complex)

Example 33 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.r4.utils.formats.Turtle.Complex)

Example 34 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.

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

Example 35 with TestScript

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

the class RdfParser method composeTestScriptSetupActionAssertRuleComponent.

protected void composeTestScriptSetupActionAssertRuleComponent(Complex parent, String parentType, String name, TestScript.SetupActionAssertRuleComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "rule", name, element, index);
    if (element.hasRuleIdElement())
        composeId(t, "TestScript", "ruleId", element.getRuleIdElement(), -1);
    for (int i = 0; i < element.getParam().size(); i++) composeTestScriptSetupActionAssertRuleParamComponent(t, "TestScript", "param", element.getParam().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu2016may.formats.RdfGenerator.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