Skip to content

resourceType or attribute evaluation #3

Description

@plynchnlm

(Moved from lhncbc/fhirpath.js, originally by niquola.)

It looks like you are testing whether the name is capitalized to determine whether it is a resource name, which I think is not the right test. Bryn said, "That when resolving an identifier that is also the root of a FHIRPath expression, it is resolved as a type name first, and if it resolves to a type, it must resolve to the type of the context (or a supertype). Otherwise, it is resolved as a path on the context." (From https://chat.fhir.org/#narrow/stream/115-fhirpath/topic/Resource.20names.20in.20FHIRPath).

Also, per that comment, it sounds like MemberInvocation is not the right place to make the check for a resource name, since in "Patient.name.given" it also gets called for "name" and "given" (i.e., non-root nodes).

Discuss topic in fhir chat, design better implementation and make decision

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions