Skip to content

add support for inheritance for FHIRPath is and as operators #3974

@PrasannaHegde1

Description

@PrasannaHegde1

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:

  1. Go to 'FHIR/fhir-path/src/test/java/org/linuxforhealth/fhir/path/test/FHIRPathIsTest.java'
  2. 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());
  1. See error - The assertion is not successful

Expected behavior
evaluator.evaluate(code, "is(string)") should return true

Metadata

Metadata

Labels

P3Priority 3 - Nice To HavebugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions