private StringAndListParam toStringAndList(List<StringType> theNarrative) { StringAndListParam retVal = new StringAndListParam(); if (theNarrative != null) { for (StringType next : theNarrative) { if (isNotBlank(next.getValue())) { retVal.addAnd(new StringOrListParam().addOr(new StringParam(next.getValue()))); } } } if (retVal.getValuesAsQueryTokens().isEmpty()) { return null; } return retVal; }
@CoverageIgnore @Override public StringAndListParam addAnd(StringOrListParam theValue) { addValue(theValue); return this; }
@Search() public List<Patient> searchByPatientAddress( @RequiredParam(name=Patient.SP_ADDRESS) StringAndListParam theAddressParts ) { // StringAndListParam is a container for 0..* StringOrListParam, which is in turn a // container for 0..* strings. It is a little bit weird to understand at first, but think of the // StringAndListParam to be an AND list with multiple OR lists inside it. So you will need // to return results which match at least one string within every OR list. List<StringOrListParam> wantedCodings = theAddressParts.getValuesAsQueryTokens(); for (StringOrListParam nextOrList : wantedCodings) { List<StringParam> queryTokens = nextOrList.getValuesAsQueryTokens(); // Only return results that match at least one of the tokens in the list below for (StringParam nextString : queryTokens) { // ....check for match... } } List<Patient> retVal = new ArrayList<Patient>(); // ...populate... return retVal; } //END SNIPPET: searchMultipleAnd
private StringAndListParam toStringAndList(List<StringType> theNarrative) { StringAndListParam retVal = new StringAndListParam(); if (theNarrative != null) { for (StringType next : theNarrative) { if (isNotBlank(next.getValue())) { retVal.addAnd(new StringOrListParam().addOr(new StringParam(next.getValue()))); } } } if (retVal.getValuesAsQueryTokens().isEmpty()) { return null; } return retVal; }
@CoverageIgnore @Override public StringAndListParam addAnd(StringOrListParam theValue) { addValue(theValue); return this; }
private StringAndListParam toStringAndList(List<StringDt> theNarrative) { StringAndListParam retVal = new StringAndListParam(); if (theNarrative != null) { for (StringDt next : theNarrative) { if (isNotBlank(next.getValue())) { retVal.addAnd(new StringOrListParam().addOr(new StringParam(next.getValue()))); } } } if (retVal.getValuesAsQueryTokens().isEmpty()) { return null; } return retVal; }
private StringAndListParam toStringAndList(List<StringType> theNarrative) { StringAndListParam retVal = new StringAndListParam(); if (theNarrative != null) { for (StringType next : theNarrative) { if (isNotBlank(next.getValue())) { retVal.addAnd(new StringOrListParam().addOr(new StringParam(next.getValue()))); } } } if (retVal.getValuesAsQueryTokens().isEmpty()) { return null; } return retVal; }
private StringAndListParam toStringAndList(List<StringType> theNarrative) { StringAndListParam retVal = new StringAndListParam(); if (theNarrative != null) { for (StringType next : theNarrative) { if (isNotBlank(next.getValue())) { retVal.addAnd(new StringOrListParam().addOr(new StringParam(next.getValue()))); } } } if (retVal.getValuesAsQueryTokens().isEmpty()) { return null; } return retVal; }
private StringAndListParam toStringAndList(List<StringDt> theNarrative) { StringAndListParam retVal = new StringAndListParam(); if (theNarrative != null) { for (StringDt next : theNarrative) { if (isNotBlank(next.getValue())) { retVal.addAnd(new StringOrListParam().addOr(new StringParam(next.getValue()))); } } } if (retVal.getValuesAsQueryTokens().isEmpty()) { return null; } return retVal; }