Added SearchRequest.requester to Patient/everything (#4462)

Co-authored-by: kylejule <kyle.jule@smilecdr.com>
This commit is contained in:
KGJ-software 2023-01-24 12:28:19 -06:00 committed by GitHub
parent d584e14048
commit 527a948285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -1521,6 +1521,20 @@ public class JpaPatientEverythingTest extends BaseResourceProviderR4Test {
assertThat(actual, hasItem(serviceRequestId));
}
@Test
public void patientEverything_shouldReturnServiceRequest_whenServiceRequestExistsThatRefersToPatientAsRequester() throws Exception {
Reference referenceToPatient = createPatient();
ServiceRequest serviceRequest = new ServiceRequest();
serviceRequest.setRequester(referenceToPatient);
String serviceRequestId = myClient.create().resource(serviceRequest).execute().getId().toUnqualifiedVersionless().getValue();
Set<String> actual = getActualEverythingResultIds(referenceToPatient.getReference());
assertThat(actual, hasItem(referenceToPatient.getReference()));
assertThat(actual, hasItem(serviceRequestId));
}
@Test
public void patientEverything_shouldReturnSpecimen_whenSpecimenExistsThatRefersToPatient() throws Exception {