Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

List 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.

The entire result set is split into the page (page number can be changed by using the query parameter i.e. page-offset=2). The page size depends on module configuration (default value) or can be configured by the query parameter (i.e. _count=2). 

FHIR Resource:

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

Fields meaning:

Field nameDescription
entryset of result FHIR resources
totalthe total number of resources
linkset of links which can be used to change the result page (“Previous/Next” links)

Query parameters:

Parameter nameDescriptionExample
_countcan be used to change the page size_count=2
page-offsetcan be used to choose a specific pagepage-offset=2

Module configuration:

Configuration keyDescriptionDefault value
default_response_page_sizedefault 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

{
    "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"
}
  • No labels