Limit Size Parameter

The parameter _count is defined as an instruction to the server regarding how many resources should be returned to the client in a single page.

If _count has the value 1, the server returns a bundle that reports the total number of resources that match in Bundle.total, but with only 1 entry.

GET [base]/Patient?_count=1

{
  "resourceType": "Bundle",
  "id": "9c027c3b-3911-47cd-bda5-0ed99fb5d92a",
  "meta": {
    "lastUpdated": "2024-02-26T09:08:36.093+00:00"
  },
  "type": "searchset",
  "total": 2,
  "link": [ {
    "relation": "self",
    "url": "http://hsgbu-lon-166.snlhrprshared1.gbucdsint02lhr.oraclevcn.com:3003/oracle-fhir-server/fhir/Patient?_count=1"
  }, {
    "relation": "next",
    "url": "http://hsgbu-lon-166.snlhrprshared1.gbucdsint02lhr.oraclevcn.com:3003/oracle-fhir-server/fhir?_getpages=9c027c3b-3911-47cd-bda5-0ed99fb5d92a&_getpagesoffset=1&_count=1&_pretty=true&_bundletype=searchset"
  } ],
  "entry": [ {
    "fullUrl": "http://hsgbu-lon-166.snlhrprshared1.gbucdsint02lhr.oraclevcn.com:3003/oracle-fhir-server/fhir/Patient/1",
    "resource": {
      "resourceType": "Patient",
      "id": "1",
      "meta": {
        "versionId": "1",
        "lastUpdated": "2024-02-26T06:59:39.364+00:00",
        "source": "#rIx8lDj54KOhTZF0"
      },
      "text": {
        "status": "generated",
        "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Name</td>\n\t\t\t\t\t\t<td>Peter James \n              <b>Chalmers</b> (&quot;Jim&quot;)\n            </td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Address</td>\n\t\t\t\t\t\t<td>534 Erewhon, Pleasantville, Vic, 3999</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Contacts</td>\n\t\t\t\t\t\t<td>Home: unknown. Work: (03) 5555 6473</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Id</td>\n\t\t\t\t\t\t<td>MRN: 12345 (Acme Healthcare)</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t</div>"
      },
      "identifier": [ {
        "use": "usual",
        "type": {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
            "code": "MR"
          } ]
        },
        "system": "urn:oid:1.2.36.146.595.217.0.1",
        "value": "12345",
        "period": {
          "start": "2001-05-06"
        },
        "assigner": {
          "display": "Acme Healthcare"
        }
      } ],
      "active": true,
      "name": [ {
        "use": "official",
        "family": "Chalmers",
        "given": [ "Peter", "James" ]
      }, {
        "use": "usual",
        "given": [ "Jim" ]
      }, {
        "use": "maiden",
        "family": "Windsor",
        "given": [ "Peter", "James" ],
        "period": {
          "end": "2002"
        }
      } ],
      "telecom": [ {
        "use": "home"
      }, {
        "system": "phone",
        "value": "(03) 5555 6473",
        "use": "work",
        "rank": 1
      }, {
        "system": "phone",
        "value": "(03) 3410 5613",
        "use": "mobile",
        "rank": 2
      }, {
        "system": "phone",
        "value": "(03) 5555 8834",
        "use": "old",
        "period": {
          "end": "2014"
        }
      } ],
      "gender": "male",
      "birthDate": "1974-12-25",
      "_birthDate": {
        "extension": [ {
         "url": "http://hl7.org/fhir/StructureDefinition/patient-birthTime",
         "valueDateTime": "1974-12-25T14:35:45-05:00"
        } ]
      },
      "deceasedBoolean": false,
      "address": [ {
        "use": "home",
        "type": "both",
        "text": "534 Erewhon St PeasantVille, Rainbow, Vic  3999",
        "line": [ "534 Erewhon St" ],
        "city": "PleasantVille",
        "district": "Rainbow",
        "state": "Vic",
        "postalCode": "3999",
        "period": {
          "start": "1974-12-25"
        }
      } ],
      "contact": [ {
        "relationship": [ {
          "coding": [ {
            "system": "http://terminology.hl7.org/CodeSystem/v2-0131",
            "code": "N"
          } ]
        } ],
        "name": {
          "family": "du Marché",
          "_family": {
            "extension": [ {
              "url": "http://hl7.org/fhir/StructureDefinition/humanname-own-prefix",
              "valueString": "VV"
            } ]
          },
          "given": [ "Bénédicte" ]
        },
        "telecom": [ {
          "system": "phone",
          "value": "+33 (237) 998327"
        } ],
        "address": {
          "use": "home",
          "type": "both",
          "line": [ "534 Erewhon St" ],
          "city": "PleasantVille",
          "district": "Rainbow",
          "state": "Vic",
          "postalCode": "3999",
          "period": {
            "start": "1974-12-25"
          }
        },
        "gender": "female",
        "period": {
          "start": "2012"
        }
      } ]
    },
    "search": {
      "mode": "match"
    }
  } ]
}

If _count has the value 0, the server returns a bundle that reports the total number of resources that match in Bundle.total, but with 0 entry.

GET [base]/Patient?_count=0

{
  "resourceType": "Bundle",
  "id": "1fda0ebb-2ec2-4590-89c9-568b2dfd4780",
  "meta": {
    "lastUpdated": "2024-02-26T09:09:47.005+00:00",
    "tag": [ {
      "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationValue",
      "code": "SUBSETTED",
      "display": "Resource encoded in summary mode"
    } ]
  },
  "type": "searchset",
  "total": 2
}

Note:

The _count parameter has no impact on the value of Bundle.total as the latter represents the total number of matches, not how many are returned in a single Bundle response.