Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue #3652 - add PDEX Drug Formulary 1.1.0 #3653

Merged
merged 5 commits into from
Jun 9, 2022
Merged

issue #3652 - add PDEX Drug Formulary 1.1.0 #3653

merged 5 commits into from
Jun 9, 2022

Conversation

lmsurpre
Copy link
Member

@lmsurpre lmsurpre commented May 20, 2022

Following the same pattern from PDEX PlanNet

This uncovered some issues with the way we were handling versioned canonicals in our profile validation
and so this PR also addresses #3654 and #3661

Signed-off-by: Lee Surprenant [email protected]

@lmsurpre lmsurpre requested a review from punktilious May 20, 2022 12:52
@lmsurpre lmsurpre force-pushed the issue-3652 branch 5 times, most recently from acaffa2 to 4c3fb07 Compare May 24, 2022 13:13
@lmsurpre lmsurpre force-pushed the issue-3652 branch 2 times, most recently from 756d9c8 to ab61a10 Compare May 24, 2022 16:27
lmsurpre added 5 commits May 24, 2022 14:09
Following the same pattern from PDEX PlanNet

Signed-off-by: Lee Surprenant <[email protected]>
* extension type profiles and value set bindings on StructureDefinitions
* meta.profile entries on examples

Signed-off-by: Lee Surprenant <[email protected]>
ConstraintGenerator.getProfiles() was called from 4 places in this
class.
All but one of those was for building the argument to the FHIRPath
`extension()` function.
That means that there should be no version suffix and so I renamed the
method to `getProfilesWithoutVersion` and updated it accordingly.

In the single other spot (`generateProfileConstraint(Node)`), I added
the `getProfile()` logic in-line.

Signed-off-by: Lee Surprenant <[email protected]>
1. Added a FHIRTermService.lookup overload which allows the caller to
pass the specific version of the CodeSystem to use. Previously, I found
that we were passing a CodeSystem to validateCode but this method
delegated to lookup which fetched its own CodeSystem. This was
problematic when the Coding didn't specify a particular CodeSystem
version when the underlying profile constraint did.

2. Moved logic for generating `conformsTo` constraints (generated-ext-1)
for each extension in the resource instance. Now it will be grouped with
the rest of the constraints and we can introspect those other
constraints to shape the constraint generation.
  - To implement this, I introduced a new "PathAwareCollectingVisitor"
although alternatively I could have executed a FHIRPath like
`descendents(extension)`
  - Instead of a constraint like `conformTo(url)` which will only
validate against the latest version of this extension in the registry,
we now generate an expression like `conformTo(url|1) or conformTo(url|2)
or conformTo(url|3)` ...one clause for each version in the registry.

Signed-off-by: Lee Surprenant <[email protected]>
Fixes an edge case where if a valueset expansion has values from
two different versions of the same codesystem and the code being looked
up specifies no version and exists in the second one. Previously, we
just returned the result of the 'contains' check on the first set of
codes.

Signed-off-by: Lee Surprenant <[email protected]>
Copy link
Collaborator

@punktilious punktilious left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Base automatically changed from issue-3650 to main June 9, 2022 15:36
@lmsurpre lmsurpre merged commit cec279a into main Jun 9, 2022
@lmsurpre lmsurpre deleted the issue-3652 branch June 9, 2022 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants