@CoverageIgnore @Override public ReferenceAndListParam addAnd(ReferenceOrListParam theValue) { addValue(theValue); return this; }
@Test public void setAuthor() { Iti66SearchParameters searchParameters = Iti66SearchParameters.builder().build(); ReferenceAndListParam param = new ReferenceAndListParam() .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_FAMILY, "family"))) .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_GIVEN, "given"))); searchParameters.setAuthor(param); assertEquals("family", searchParameters.getAuthorFamilyName().getValue()); assertEquals("given", searchParameters.getAuthorGivenName().getValue()); } }
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; } }
@Test public void setAuthor() { Iti67SearchParameters searchParameters = Iti67SearchParameters.builder().build(); ReferenceAndListParam param = new ReferenceAndListParam() .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_FAMILY, "family"))) .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_GIVEN, "given"))); searchParameters.setAuthor(param); assertEquals("family", searchParameters.getAuthorFamilyName().getValue()); assertEquals("given", searchParameters.getAuthorGivenName().getValue()); } }
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; } }
@Test public void setAuthor() { Iti66SearchParameters searchParameters = Iti66SearchParameters.builder().build(); ReferenceAndListParam param = new ReferenceAndListParam() .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_FAMILY, "family"))) .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_GIVEN, "given"))); searchParameters.setAuthor(param); assertEquals("family", searchParameters.getAuthorFamilyName().getValue()); assertEquals("given", searchParameters.getAuthorGivenName().getValue()); } }
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; } }
@CoverageIgnore @Override public ReferenceAndListParam addAnd(ReferenceOrListParam theValue) { addValue(theValue); return this; }
@Test public void setAuthor() { Iti67SearchParameters searchParameters = Iti67SearchParameters.builder().build(); ReferenceAndListParam param = new ReferenceAndListParam() .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_FAMILY, "family"))) .addAnd(new ReferenceOrListParam() .addOr(new ReferenceParam(Practitioner.SP_GIVEN, "given"))); searchParameters.setAuthor(param); assertEquals("family", searchParameters.getAuthorFamilyName().getValue()); assertEquals("given", searchParameters.getAuthorGivenName().getValue()); } }
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; } }