This commit is contained in:
James Agnew 2017-06-28 19:54:24 -04:00
parent 3ed12ce944
commit 10ff2dd16c
2 changed files with 15 additions and 2 deletions

View File

@ -173,12 +173,14 @@ public class ReferenceParam extends BaseParam /*implements IQueryParameterType*/
return true;
}
public void setChain(String theChain) {
public ReferenceParam setChain(String theChain) {
myChain = theChain;
return this;
}
public void setValue(String theValue) {
public ReferenceParam setValue(String theValue) {
myId.setValue(theValue);
return this;
}
/**

View File

@ -153,6 +153,17 @@ public class FhirResourceDaoDstu3SearchNoFtTest extends BaseJpaDstu3Test {
assertThat(ids, contains(moId.getValue()));
}
@Test
public void testEmptyChain() {
SearchParameterMap map = new SearchParameterMap();
map.add(Encounter.SP_SUBJECT, new ReferenceAndListParam().addAnd(new ReferenceOrListParam().add((ReferenceParam)new ReferenceParam("subject", "04823543").setChain("identifier"))));
IBundleProvider results = myMedicationAdministrationDao.search(map);
List<String> ids = toUnqualifiedIdValues(results);
assertThat(ids, empty());
}
@Test
public void testEverythingTimings() throws Exception {
String methodName = "testEverythingTimings";