Patients Search

Patients search

There are three types of patients search available for user:

  • by user last name
  • by city
  • advanced search
  • clunical query search

All search types have equal GET response structure, which is described below.

Switcher of user search is located in the topbar

Patient list view
Patient search switcher

Search by user last name

Patients search by last name
Patients search by last name
API URL
  /mpi/Patient?name={lastname}

Advanced search

Patients advanced search
Patients advanced search
API URL
  /mpi/Patient/search/advanced
POST request structure

All parameters in POST-request are optional. No one parameter is required. But there are to search modes to set patient age:

  • by date of born

            {
                firstName: "rob",
                from: 24,
                gender: "male",
                lastName: "tweed",
                nhsNumber: 1234567890,
                to: 73
            }
            
  • by age range

            {
                birthDate: "2019-07-01",
                firstName: "rob",
                gender: "male",
                lastName: "tweed",
                nhsNumber: 1234567890
            }
            

Clinical query search

Patients clinical query search
Patients clinical query search
API URL

API URL depends on Search Type parameter in clinical query form:

  /api/patient/clinicalSearch/allergies
  /api/patient/clinicalSearch/problems
  /api/patient/clinicalSearch/medications
  /api/patient/clinicalSearch/procedures
POST request structure

As same as in advanced search, all parameters in POST-request are optional. No one parameter is required. But there are to search modes to set patient age:

  • by date of born

            {
                from: 15,
                gender: "male",
                query: "cats",
                to: 69
            }
            
  • by age range

            {
                birthDate: "2019-07-01",
                gender: "male",
                query: "cats",
            }
            

Search by City

Search by city is used in the Patients by Cities chart at the default homepage

Patients search by City
Patients search by City

Click on the Chart bar sends POST-request to the server side automatically

API URL
  /mpi/Patient/search/searchByCity
POST-request structure
{
    city: "Edinburgh"
}
GET response (equals from all patients search types)
  {
  	entry: [
      0: {....},
      1: {....},
      2: {....},
      3: {
        resource: {
            address: [
                0: {
                    city: "City",
                    country: "Country",
                    district: "District",
                    line: [
                        0: "Baker street, 221-b",
                    ],
                    postalCode: 1234,
                },
                1: {....}
            ],
            birthDate: "1985-07-25",
            deceasedBoolean: false,
            gender: "female",
            id: "5024d12f-ec35-4619-b982-8f27d28ee71c",
            identifier: [
                0: {
                    system: "https://fhir.nhs.uk/Id/nhs-number",
                    value: 5555555541,
                }
            ],
            name: [
                0: {
                    family: "Kolt",
                    given: [
                        "Elise",
                    ]
                    prefix: "Lisa"
                }
            ],
            resourceType: "Patient",
            telecom: "7 093 243 3598",
        },
      },
      4: {....},
      5: {....},
    ],
    resourceType: "Bundle",
    token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9......",
  }