Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
feat: enable id only searching for reference types (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmayda authored Aug 31, 2021
1 parent 68b4801 commit 4998d7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions integration-tests/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ describe('search', () => {
p({ email: testPatient.telecom.find(x => x.system === 'email')!.value }),
p({ telecom: testPatient.telecom.find(x => x.system === 'email')!.value }),
p({ organization: testPatient.managingOrganization.reference }),
p({ organization: testPatient.managingOrganization.reference.substr('Organization/'.length) }), // search just the id
p({ 'general-practitioner': testPatient.generalPractitioner.reference }),
p({ 'general-practitioner': testPatient.generalPractitioner.reference.substr('Practitioner/'.length) }), // search just the id
];

// run tests serially for easier debugging and to avoid throttling
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ export const randomPatient = () => {
managingOrganization: {
reference: `Organization/${chance.word({ length: 15 })}`,
},
generalPractitioner: {
reference: `Practitioner/${chance.word({ length: 15 })}`,
},
};
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"fhir-works-on-aws-interface": "10.0.0",
"fhir-works-on-aws-persistence-ddb": "3.7.0",
"fhir-works-on-aws-routing": "6.0.0",
"fhir-works-on-aws-search-es": "3.3.0",
"fhir-works-on-aws-search-es": "3.4.0",
"serverless-http": "^2.3.1",
"yargs": "^16.2.0"
},
Expand Down

0 comments on commit 4998d7d

Please sign in to comment.