java.lang.Object
org.projecthusky.communication.mpi.impl.pdq.V3PdqQuery
All Implemented Interfaces:
MpiQuery

public class V3PdqQuery extends Object implements MpiQuery
The class V3PdqQuery implements the MpiQuery functionality for the Patient Demographics Query (PDQ) ITI-47.
  • Constructor Details

    • V3PdqQuery

      public V3PdqQuery(String senderApplicationOID, String senderFacilityOID, String receiverApplicationOID, String receiverFacilityOID)
      Instantiates a new v3 pdq query.
      Parameters:
      senderApplicationOID - the sender application oid
      senderFacilityOID - the sender facility oid
      receiverApplicationOID - the receiver application oid
      receiverFacilityOID - the receiver facility oid
  • Method Details

    • addDomainToReturn

      public MpiQuery addDomainToReturn(String organizationOID)
      Returned patient identifiers will include the added domain if available
      Specified by:
      addDomainToReturn in interface MpiQuery
      Parameters:
      organizationOID - the organization oid
      Returns:
      the query object
    • addMothersMaidenName

      public MpiQuery addMothersMaidenName(boolean useFuzzySearch, org.hl7.fhir.r4.model.HumanName humanDt)
      Adds the mothers maiden name the query
      Specified by:
      addMothersMaidenName in interface MpiQuery
      Parameters:
      useFuzzySearch - if true does not require an exact match, see Table 3.47.4.1.2-1: Model Attributes (ITI TF-2b)
      humanDt - name
      Returns:
      the query object
    • addPatientAddress

      public MpiQuery addPatientAddress(org.hl7.fhir.r4.model.Address address)
      Adds a patient address to the query.
      Specified by:
      addPatientAddress in interface MpiQuery
      Parameters:
      address - the address to be queried for
      Returns:
      the query object
    • addPatientIdentifier

      public MpiQuery addPatientIdentifier(org.hl7.fhir.r4.model.Identifier identifier)
      Adds a patient identifier to be queried for
      Specified by:
      addPatientIdentifier in interface MpiQuery
      Parameters:
      identifier - patient identifier
      Returns:
      the query object
    • addPatientName

      public MpiQuery addPatientName(boolean useFuzzySearch, org.hl7.fhir.r4.model.HumanName humanDt)
      Adds a patient name to the query.
      Specified by:
      addPatientName in interface MpiQuery
      Parameters:
      useFuzzySearch - if true does not require an exact match, see Table 3.47.4.1.2-1: Model Attributes (ITI TF-2b)
      humanDt - name
      Returns:
      the query object
    • addPatientTelecom

      public MpiQuery addPatientTelecom(org.hl7.fhir.r4.model.ContactPoint contactPoint)
      Adds a patient telecom to be queried for.
      Specified by:
      addPatientTelecom in interface MpiQuery
      Parameters:
      contactPoint - telecom
      Returns:
      the query object
    • cancelQuery

      public MpiQuery cancelQuery()
      Cancels the next query.
      Specified by:
      cancelQuery in interface MpiQuery
      Returns:
      the query object
    • continueQuery

      public MpiQuery continueQuery()
      Continues query for the next pageCount results.
      Specified by:
      continueQuery in interface MpiQuery
      Returns:
      continues the query for the next batch
    • doCancelQuery

      public boolean doCancelQuery()
      if query should be canceled
      Returns:
      true cancel next query
    • doContinueQuery

      public boolean doContinueQuery()
      if query should be continued
      Returns:
      true continue next query
    • getLastPdqConsumerResponse

      public V3PdqConsumerResponse getLastPdqConsumerResponse()
      Gets the last pdq consumer response.
      Returns:
      the last pdq consumer response
    • getPageCount

      public int getPageCount()
      gets the page count for partial lists of search results (QueryByParameter.initialQuantity).
      Returns:
      the page count
    • getV3PdqConsumerQuery

      public V3PdqConsumerQuery getV3PdqConsumerQuery()
      Gets the v3 consumer query object.
      Returns:
      the v3 pdq consumer query
    • setLastPdqConsumerResponse

      public void setLastPdqConsumerResponse(V3PdqConsumerResponse lastPdqConsumerResponse)
      Sets the pdq consumer response.
      Parameters:
      lastPdqConsumerResponse - the new last pdq consumer response
    • setPageCount

      public MpiQuery setPageCount(int pageCount)
      Sets the page count for partial lists of search results (QueryByParameter.initialQuantity).
      Specified by:
      setPageCount in interface MpiQuery
      Parameters:
      pageCount - the page count
      Returns:
      the query object
    • setPatientBirthDate

      public MpiQuery setPatientBirthDate(Date date)
      Sets the patient birth date for the query.
      Specified by:
      setPatientBirthDate in interface MpiQuery
      Parameters:
      date - the date
      Returns:
      the query object
    • setPatientSex

      public MpiQuery setPatientSex(org.hl7.fhir.r4.model.Enumerations.AdministrativeGender administrativeGender)
      Sets the patient sex for the query.
      Specified by:
      setPatientSex in interface MpiQuery
      Parameters:
      administrativeGender - gender
      Returns:
      the query object