Skip to content

Latest commit

 

History

History
76 lines (60 loc) · 1.46 KB

File metadata and controls

76 lines (60 loc) · 1.46 KB
title description
Search patients
Search patients by patient code or national registry number

Search for a patient in your tenant by patient code or national registry number. The search is done via an exact text match, and returns up to 100 matches. If you require a more powerful search then consider the patients query.

Query

Search by patient code:

query SearchPatientsByPatientCode($patient_code: String!) {
  searchPatientsByPatientCode(patient_code: $patient_code) {
    patients {
      id
    }
  }
}

Search by national registry number:

query SearchPatientsByNationalRegistryNumber(
  $national_registry_number: String!
) {
  searchPatientsByNationalRegistryNumber(
    national_registry_number: $national_registry_number
  ) {
    patients {
      id
    }
  }
}

Variables

Search by patient code:

{
  "patient_code": "{{PATIENT_CODE}}"
}

Search by national regsitry number:

{
  "national_registry_number": "{{NATIONAL_REGISTRY_NUMBER}}"
}

Response

The response is a list of patient objects that exactly match the search criteria. If no patients are found that match the criteria, an empty patient list is returned.

{
  "data": {
    "searchPatientsByPatientCode": {
      "patients": [
        {
          "id": "S8GxueMYsilfryt8Wg30f"
        }
      ]
    }
  }
}

How to use

<HowToUse storyIds={['search-patients']} />