Describe the bug
add support for inheritance for FHIRPath is and as operators
For example: code data type is a sub type of string, and the validation of expression "code.is(string)" should be successful.
For more information see - https://chat.fhir.org/#narrow/stream/179266-fhirpath/topic/FHIRPath.20.60is.60.20and.20.60as.60.20with.20FHIR.20types
Environment
Which version of LinuxForHealth FHIR Server? 5.0
To Reproduce
Steps to reproduce the behavior:
- Go to 'FHIR/fhir-path/src/test/java/org/linuxforhealth/fhir/path/test/FHIRPathIsTest.java'
- Create a code data type variable and validate the expression code.is(string)" An example is given below
Code code = Code.of("100");
FHIRPathEvaluator evaluator = FHIRPathEvaluator.evaluator();
Collection<FHIRPathNode> result = evaluator.evaluate(code, "is(string)");
assertTrue(getSingleton(result, FHIRPathBooleanValue.class)._boolean());
- See error - The assertion is not successful
Expected behavior
evaluator.evaluate(code, "is(string)") should return true
Describe the bug
add support for inheritance for FHIRPath is and as operators
For example: code data type is a sub type of string, and the validation of expression "code.is(string)" should be successful.
For more information see - https://chat.fhir.org/#narrow/stream/179266-fhirpath/topic/FHIRPath.20.60is.60.20and.20.60as.60.20with.20FHIR.20types
Environment
Which version of LinuxForHealth FHIR Server? 5.0
To Reproduce
Steps to reproduce the behavior:
Expected behavior
evaluator.evaluate(code, "is(string)") should return true