Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

List of content:

Table of Contents
excludeList of content

Description:

Using the HTTP GET method without specifying the resource primary key could return a set of resources. In that case, the response is represented as FHIR Bundle resource.

...

https://www.hl7.org/fhir/STU3/bundle.html#Bundle.link

Fields meaning:

Field name

Description

entry

set of result FHIR resources

total

the total number of resources

link

set of links which can be used to change the result page (“Previous/Next” links)

Query parameters:

Parameter name

Description

Example

_count

can be used to change the page size

_count=2

page-offset

can be used to choose a specific page

page-offset=2

Module configuration:

Configuration key

Description

Default value

default_response_page_size

default value which for page size

"default_response_page_size": 10,

Example JSON representation of content:

Used HTTP operation: GET
Used URL: http://127.0.0.1:8000/api_fhir/Patient/?_count=2

Code Block
{
    "resourceType": "Bundle",
    "entry": [
        {
            "fullUrl": "http://127.0.0.1:8000/api_fhir/Patient/4",
            "resource": {
                "resourceType": "Patient",
                "address": [
                    {
                        "text": "address",
                        "type": "physical",
                        "use": "home"
                    },
                    {
                        "text": "geolocation",
                        "type": "both",
                        "use": "home"
                    }
                ],
                "birthDate": "2000-01-02",
                "gender": "female",
                "id": 4,
                "identifier": [
                    {
                        "type": {
                            "coding": [
                                {
                                    "code": "ACSN",
                                    "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                                }
                            ]
                        },
                        "use": "usual",
                        "value": "4"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "code": "SB",
                                    "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                                }
                            ]
                        },
                        "use": "usual",
                        "value": "chfid"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "code": "PPN",
                                    "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                                }
                            ]
                        },
                        "use": "usual",
                        "value": "passport"
                    }
                ],
                "maritalStatus": {
                    "coding": [
                        {
                            "code": "U",
                            "system": "https://www.hl7.org/fhir/STU3/valueset-marital-status.html"
                        }
                    ]
                },
                "name": [
                    {
                        "family": "test patient",
                        "given": [
                            "test patient"
                        ],
                        "use": "usual"
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "use": "home",
                        "value": "phoneNum"
                    },
                    {
                        "system": "email",
                        "use": "home",
                        "value": "email@email.com"
                    }
                ]
            }
        },
        {
            "fullUrl": "http://127.0.0.1:8000/api_fhir/Patient/5",
            "resource": {
                "resourceType": "Patient",
                "address": [
                    {
                        "text": "address",
                        "type": "physical",
                        "use": "home"
                    },
                    {
                        "text": "geolocation",
                        "type": "both",
                        "use": "home"
                    }
                ],
                "birthDate": "2000-01-02",
                "gender": "female",
                "id": 5,
                "identifier": [
                    {
                        "type": {
                            "coding": [
                                {
                                    "code": "ACSN",
                                    "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                                }
                            ]
                        },
                        "use": "usual",
                        "value": "5"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "code": "SB",
                                    "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                                }
                            ]
                        },
                        "use": "usual",
                        "value": "chfid"
                    },
                    {
                        "type": {
                            "coding": [
                                {
                                    "code": "PPN",
                                    "system": "https://hl7.org/fhir/valueset-identifier-type.html"
                                }
                            ]
                        },
                        "use": "usual",
                        "value": "passport"
                    }
                ],
                "maritalStatus": {
                    "coding": [
                        {
                            "code": "U",
                            "system": "https://www.hl7.org/fhir/STU3/valueset-marital-status.html"
                        }
                    ]
                },
                "name": [
                    {
                        "family": "test patient",
                        "given": [
                            "test patient"
                        ],
                        "use": "usual"
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "use": "home",
                        "value": "phoneNum"
                    },
                    {
                        "system": "email",
                        "use": "home",
                        "value": "email@email.com"
                    }
                ]
            }
        }
    ],
    "link": [
        {
            "relation": "self",
            "url": "http://127.0.0.1:8000/api_fhir/Patient/?_count=2"
        },
        {
            "relation": "next",
            "url": "http://127.0.0.1:8000/api_fhir/Patient/?_count=2&page-offset=2"
        }
    ],
    "total": 9,
    "type": "searchset"
}

...