Skip to content

Commit

Permalink
Add comments about ANDed codeFilters on DRs
Browse files Browse the repository at this point in the history
  • Loading branch information
elsaperelli committed Jan 4, 2025
1 parent a930691 commit 22a99b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Test patients can be created in the app by clicking on the "Create" button in th

#### Importing a Patient Bundle

Test cases can be imported by clicking the "Import" button in the left panel, which will open a file dropzone that accepts JSON files of FHIR Patient Bundles and `.zip` files composed of FHIR Patient Bundles. Patient Bundles may contain additional FHIR resources. These FHIR resources are also loaded into the app and will belong to the patient contained in the Patient Bundle. When importing a Patient Bundle or Bundles, there is a switch to remove resources not relevant to the Measure. When set, the resources that are not included in the provided Measure's data requirements will be removed from the Patient Bundle.
Test cases can be imported by clicking the "Import" button in the left panel, which will open a file dropzone that accepts JSON files of FHIR Patient Bundles and `.zip` files composed of FHIR Patient Bundles. Patient Bundles may contain additional FHIR resources. These FHIR resources are also loaded into the app and will belong to the patient contained in the Patient Bundle. When importing a Patient Bundle or Bundles, there is a switch to remove resources not relevant to the Measure. When set, the resources that are not included in the provided Measure's data requirements will be removed from the Patient Bundle. NOTE: Resources included in the provided Measure's data requirements are defined as resources whose primaryCodePath value match with ANY of the codes on any data requirements of the same resource type, whether those codes are included in a direct reference code or a ValueSet. Resources are only required to match with at least one codeFilter on a data requirement, not all codeFilters if a Data Requirement has multiple.

#### Selecting Desired Measure Populations

Expand Down
4 changes: 4 additions & 0 deletions state/selectors/dataRequirementsLookupByType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export const dataRequirementsLookupByType = selector<Record<string, DataRequirem
if (dr.codeFilter === undefined) {
result[dr.type].keepAll = true;
} else {
// Note: even though the codeFilters on a DataRequirement are ANDed together, we are looking at them
// separately to see if there are ANY matches. Therefore, this lookup object is simply a list of
// all of the codeFilters and ignores any relationship they may have with each other based on their
// parent DataRequirement
dr.codeFilter.forEach(cf => {
if (cf.valueSet) {
result[dr.type].valueSets = result[dr.type].valueSets.concat(cf.valueSet);
Expand Down

0 comments on commit 22a99b5

Please sign in to comment.