private boolean hasChain(List<List<? extends IQueryParameterType>> theAndOrParams) { return theAndOrParams.stream().flatMap(List::stream).anyMatch(param -> param instanceof ReferenceParam && ((ReferenceParam)param).getChain() != null); }
@Search public List<DiagnosticReport> findReportsWithChain( @RequiredParam(name=DiagnosticReport.SP_SUBJECT, chainWhitelist= {Patient.SP_FAMILY, Patient.SP_GENDER}) ReferenceParam theSubject ) { List<DiagnosticReport> retVal=new ArrayList<DiagnosticReport>(); String chain = theSubject.getChain(); if (Patient.SP_FAMILY.equals(chain)) { String familyName = theSubject.getValue(); // .. populate with reports matching subject family name .. } if (Patient.SP_GENDER.equals(chain)) { String gender = theSubject.getValue(); // .. populate with reports matching subject gender .. } return retVal; } //END SNIPPET: referenceWithChain
@Search public List<DiagnosticReport> findReportsWithChainCombo ( @RequiredParam(name=DiagnosticReport.SP_SUBJECT, chainWhitelist= {"", Patient.SP_FAMILY}) ReferenceParam theSubject ) { List<DiagnosticReport> retVal=new ArrayList<DiagnosticReport>(); String chain = theSubject.getChain(); if (Patient.SP_FAMILY.equals(chain)) { String familyName = theSubject.getValue(); // .. populate with reports matching subject family name .. } if ("".equals(chain)) { String resourceId = theSubject.getValue(); // .. populate with reports matching subject with resource ID .. } return retVal; } //END SNIPPET: referenceWithChainCombo
@Override String doGetValueAsQueryToken(FhirContext theContext) { if (isBlank(myId.getResourceType())) { return myId.getValue(); // e.g. urn:asdjd or 123 or cid:wieiuru or #1 } else { if (isBlank(getChain())) { return getResourceType() + "/" + myId.getIdPart(); } return myId.getIdPart(); } }
List<Observation> observations = new ArrayList<Observation>(); String chain = subject.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) {
ReferenceParam ref = (ReferenceParam) nextOr; if (isBlank(ref.getChain())) { IIdType dt = new IdDt(ref.getBaseUrl(), ref.getResourceType(), ref.getIdPart(), null); String chain = ref.getChain(); String remainingChain = null; int chainDotIndex = chain.indexOf('.'); throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "invalidParameterChain", theParamName + '.' + ref.getChain()));
@Override String doGetValueAsQueryToken(FhirContext theContext) { if (isBlank(myId.getResourceType())) { return myId.getValue(); // e.g. urn:asdjd or 123 or cid:wieiuru or #1 } else { if (isBlank(getChain())) { return getResourceType() + "/" + myId.getIdPart(); } return myId.getIdPart(); } }
public Iti66SearchParameters setAuthor(ReferenceAndListParam author) { if (author != null) { author.getValuesAsQueryTokens().forEach(param -> { ReferenceParam ref = param.getValuesAsQueryTokens().get(0); String authorChain = ref.getChain(); if (Practitioner.SP_FAMILY.equals(authorChain)) { setAuthorFamilyName(ref.toStringParam(getFhirContext())); } else if (Practitioner.SP_GIVEN.equals(authorChain)) { setAuthorGivenName(ref.toStringParam(getFhirContext())); } }); } return this; } }
public Iti67SearchParameters setAuthor(ReferenceAndListParam author) { if (author != null) { author.getValuesAsQueryTokens().forEach(param -> { ReferenceParam ref = param.getValuesAsQueryTokens().get(0); String authorChain = ref.getChain(); if (Practitioner.SP_FAMILY.equals(authorChain)) { setAuthorFamilyName(ref.toStringParam(getFhirContext())); } else if (Practitioner.SP_GIVEN.equals(authorChain)) { setAuthorGivenName(ref.toStringParam(getFhirContext())); } }); } return this; } }
public Iti67SearchParameters setAuthor(ReferenceAndListParam author) { if (author != null) { author.getValuesAsQueryTokens().forEach(param -> { ReferenceParam ref = param.getValuesAsQueryTokens().get(0); String authorChain = ref.getChain(); if (Practitioner.SP_FAMILY.equals(authorChain)) { setAuthorFamilyName(ref.toStringParam(getFhirContext())); } else if (Practitioner.SP_GIVEN.equals(authorChain)) { setAuthorGivenName(ref.toStringParam(getFhirContext())); } }); } return this; } }
public Iti66SearchParameters setAuthor(ReferenceAndListParam author) { if (author != null) { author.getValuesAsQueryTokens().forEach(param -> { ReferenceParam ref = param.getValuesAsQueryTokens().get(0); String authorChain = ref.getChain(); if (Practitioner.SP_FAMILY.equals(authorChain)) { setAuthorFamilyName(ref.toStringParam(getFhirContext())); } else if (Practitioner.SP_GIVEN.equals(authorChain)) { setAuthorGivenName(ref.toStringParam(getFhirContext())); } }); } return this; } }
ReferenceParam ref = (ReferenceParam) nextOr; if (isBlank(ref.getChain())) { IIdType dt = new IdDt(ref.getBaseUrl(), ref.getResourceType(), ref.getIdPart(), null); String chain = ref.getChain(); String remainingChain = null; int chainDotIndex = chain.indexOf('.'); throw new InvalidRequestException(myContext.getLocalizer().getMessage(BaseHapiFhirResourceDao.class, "invalidParameterChain", theParamName + '.' + ref.getChain()));
.build(); String chain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) { parameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
.build(); String chain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) { parameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
String chain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) { searchParameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
String chain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) { searchParameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
String patientChain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(patientChain)) { searchParameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
String patientChain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(patientChain)) { searchParameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
.build(); String chain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) { searchParameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));
.build(); String chain = patient.getChain(); if (Patient.SP_IDENTIFIER.equals(chain)) { searchParameters.setPatientIdentifier(patient.toTokenParam(getFhirContext()));