Search in sources :

Example 46 with TestScript

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

the class RdfParser method composeTestScriptTestScriptVariableComponent.

protected void composeTestScriptTestScriptVariableComponent(Complex parent, String parentType, String name, TestScript.TestScriptVariableComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "variable", name, element, index);
    if (element.hasNameElement())
        composeString(t, "TestScript", "name", element.getNameElement(), -1);
    if (element.hasDefaultValueElement())
        composeString(t, "TestScript", "defaultValue", element.getDefaultValueElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "TestScript", "description", element.getDescriptionElement(), -1);
    if (element.hasExpressionElement())
        composeString(t, "TestScript", "expression", element.getExpressionElement(), -1);
    if (element.hasHeaderFieldElement())
        composeString(t, "TestScript", "headerField", element.getHeaderFieldElement(), -1);
    if (element.hasHintElement())
        composeString(t, "TestScript", "hint", element.getHintElement(), -1);
    if (element.hasPathElement())
        composeString(t, "TestScript", "path", element.getPathElement(), -1);
    if (element.hasSourceIdElement())
        composeId(t, "TestScript", "sourceId", element.getSourceIdElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 47 with TestScript

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

the class RdfParser method composeTestScriptTestScriptMetadataCapabilityComponent.

protected void composeTestScriptTestScriptMetadataCapabilityComponent(Complex parent, String parentType, String name, TestScript.TestScriptMetadataCapabilityComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "capability", name, element, index);
    if (element.hasRequiredElement())
        composeBoolean(t, "TestScript", "required", element.getRequiredElement(), -1);
    if (element.hasValidatedElement())
        composeBoolean(t, "TestScript", "validated", element.getValidatedElement(), -1);
    if (element.hasDescriptionElement())
        composeString(t, "TestScript", "description", element.getDescriptionElement(), -1);
    for (int i = 0; i < element.getOrigin().size(); i++) composeInteger(t, "TestScript", "origin", element.getOrigin().get(i), i);
    if (element.hasDestinationElement())
        composeInteger(t, "TestScript", "destination", element.getDestinationElement(), -1);
    for (int i = 0; i < element.getLink().size(); i++) composeUri(t, "TestScript", "link", element.getLink().get(i), i);
    if (element.hasCapabilities())
        composeReference(t, "TestScript", "capabilities", element.getCapabilities(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 48 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.dstu3.utils.formats.Turtle.Complex)

Example 49 with TestScript

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

the class RdfParser method composeTestScriptActionAssertRulesetComponent.

protected void composeTestScriptActionAssertRulesetComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "ruleset", name, element, index);
    if (element.hasRulesetIdElement())
        composeId(t, "TestScript", "rulesetId", element.getRulesetIdElement(), -1);
    for (int i = 0; i < element.getRule().size(); i++) composeTestScriptActionAssertRulesetRuleComponent(t, "TestScript", "rule", element.getRule().get(i), i);
}
Also used : Complex(org.hl7.fhir.dstu3.utils.formats.Turtle.Complex)

Example 50 with TestScript

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

the class RdfParser method composeTestScriptActionAssertRulesetRuleParamComponent.

protected void composeTestScriptActionAssertRulesetRuleParamComponent(Complex parent, String parentType, String name, TestScript.ActionAssertRulesetRuleParamComponent element, int index) {
    if (element == null)
        return;
    Complex t;
    if (Utilities.noString(parentType))
        t = parent;
    else {
        t = parent.predicate("fhir:" + parentType + '.' + name);
    }
    composeBackboneElement(t, "param", name, element, index);
    if (element.hasNameElement())
        composeString(t, "TestScript", "name", element.getNameElement(), -1);
    if (element.hasValueElement())
        composeString(t, "TestScript", "value", element.getValueElement(), -1);
}
Also used : Complex(org.hl7.fhir.dstu3.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