{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"FHIR R4 Query Guide","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"__idx":0,"id":"fhir-r4-query-guide"},"children":["FHIR R4 Query Guide"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":1,"id":"table-of-contents"},"children":["Table of Contents"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#patient-resource"},"children":["Patient Resource"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#coverage-resource"},"children":["Coverage Resource"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#careplan-resource"},"children":["CarePlan Resource"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#common-query-parameters"},"children":["Common Query Parameters"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#advanced-query-techniques"},"children":["Advanced Query Techniques"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"a","attributes":{"href":"#pagination"},"children":["Pagination"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":2,"id":"patient-resource"},"children":["Patient Resource"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":3,"id":"overview"},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Patient resource contains demographic and administrative information about individuals receiving healthcare services."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":4,"id":"key-elements"},"children":["Key Elements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Demographics (name, birthdate, gender)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Contact information"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Language preferences"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Primary care provider"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Communication preferences"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Marital status"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Address history"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":5,"id":"basic-queries"},"children":["Basic Queries"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Search by name\nGET [base]/Patient?name=Smith\n\n# Search by birth date\nGET [base]/Patient?birthdate=1970-01-01\n\n# Search by identifier (e.g., SSN, MRN)\nGET [base]/Patient?identifier=12345\n\n# Combined demographic search\nGET [base]/Patient?\n  given=John&\n  family=Smith&\n  gender=male&\n  birthdate=ge1960-01-01\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":6,"id":"common-filter-options"},"children":["Common Filter Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]},": Full, given, or family name"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["birthdate"]},": Exact date or range"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gender"]},": male, female, other, unknown"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["address"]},": City, state, postal code"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["active"]},": true/false"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]},": Preferred language"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier"]},": Various ID types"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":7,"id":"coverage-resource"},"children":["Coverage Resource"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":8,"id":"overview-1"},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Coverage resource details insurance or payment information for healthcare services."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":9,"id":"key-elements-1"},"children":["Key Elements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Coverage status"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Subscriber information"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Benefit period"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Payor details"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Network information"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Cost-sharing details"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Coverage type"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":10,"id":"basic-queries-1"},"children":["Basic Queries"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Active coverage for patient\nGET [base]/Coverage?\n  patient=12345&\n  status=active\n\n# Coverage with specific payor\nGET [base]/Coverage?\n  patient=12345&\n  payor=Organization/789\n\n# Coverage within date range\nGET [base]/Coverage?\n  patient=12345&\n  period=ge2023-01-01&\n  period=le2023-12-31\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":11,"id":"common-filter-options-1"},"children":["Common Filter Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},": active, cancelled, draft"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]},": Insurance type (medical, dental, etc.)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["period"]},": Coverage dates"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payor"]},": Insurance company"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subscriber"]},": Primary insurance holder"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["beneficiary"]},": Covered individual"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["class"]},": Coverage classification"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":12,"id":"careplan-resource"},"children":["CarePlan Resource"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":13,"id":"overview-2"},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The CarePlan resource documents the intended care strategy and goals for a patient."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":14,"id":"key-elements-2"},"children":["Key Elements"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Care goals"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Planned activities"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Care team members"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treatment protocols"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Progress notes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Status updates"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Care instructions"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":15,"id":"basic-queries-2"},"children":["Basic Queries"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Active care plans\nGET [base]/CarePlan?\n  patient=12345&\n  status=active\n\n# Care plans by condition\nGET [base]/CarePlan?\n  patient=12345&\n  condition=Condition/567\n\n# Care plans by date\nGET [base]/CarePlan?\n  patient=12345&\n  date=ge2023-01-01&\n  _sort=-date\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":16,"id":"common-filter-options-2"},"children":["Common Filter Options"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},": draft, active, completed, cancelled"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["category"]},": Type of care plan"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["condition"]},": Related health conditions"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date"]},": Plan creation or update date"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["author"]},": Care plan creator"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["care-team"]},": Involved healthcare providers"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["goal"]},": Treatment goals"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":17,"id":"common-query-parameters"},"children":["Common Query Parameters"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":18,"id":"search-result-control"},"children":["Search Result Control"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_count"]},": Number of results per page"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_sort"]},": Sort order of results"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_include"]},": Include related resources"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_revinclude"]},": Include referring resources"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_summary"]},": Return only summary information"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":19,"id":"date-parameters"},"children":["Date Parameters"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eq"]},": Equals"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ne"]},": Not equals"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gt"]},": Greater than"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lt"]},": Less than"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ge"]},": Greater than or equals"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["le"]},": Less than or equals"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":20,"id":"string-parameters"},"children":["String Parameters"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":exact"]},": Exact match"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":contains"]},": Contains substring"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[":text"]},": Text search"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":21,"id":"advanced-query-techniques"},"children":["Advanced Query Techniques"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":22,"id":"chained-parameters"},"children":["Chained Parameters"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Patient with specific condition\nGET [base]/Patient?\n  _has:Condition:patient:code=http://snomed.info/sct|73211009\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":23,"id":"combined-resources"},"children":["Combined Resources"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Patient with coverage and care plan\nGET [base]/Patient?\n  _id=12345&\n  _include=Patient:general-practitioner&\n  _revinclude=Coverage:patient&\n  _revinclude=CarePlan:patient\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":24,"id":"composite-parameters"},"children":["Composite Parameters"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Search by name and birthdate combination\nGET [base]/Patient?\n  given-family-birthdate=John$Smith$1970-01-01\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":25,"id":"multi-resource-search"},"children":["Multi-Resource Search"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Find all resources for a patient\nGET [base]/Patient/12345/$everything\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":26,"id":"filtering-extensions"},"children":["Filtering Extensions"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Search using custom extensions\nGET [base]/Coverage?\n  patient=12345&\n  extension-custom-benefit-type=dental\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":27,"id":"resource-references"},"children":["Resource References"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# Find care plans referencing specific practitioners\nGET [base]/CarePlan?\n  patient=12345&\n  performer:Practitioner=Practitioner/789\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"__idx":28,"id":"pagination"},"children":["Pagination"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":29,"id":"overview-3"},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API implements pagination using two key parameters:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_count"]},": Specifies the number of results per page"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_page_token"]},": Token for accessing subsequent pages"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":30,"id":"response-structure"},"children":["Response Structure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The API returns pagination information in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["link"]}," array of the response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"link\": [\n        {\n            \"relation\": \"search\",\n            \"url\": \"[base]/Patient/?_count=1\"\n        },\n        {\n            \"relation\": \"next\",\n            \"url\": \"[base]/Patient/?_count=1&_page_token=AUAcb7bUcVAqcd...\"\n        },\n        {\n            \"relation\": \"first\",\n            \"url\": \"[base]/Patient/?_count=1\"\n        },\n        {\n            \"relation\": \"self\",\n            \"url\": \"[base]/Patient/?_count=1\"\n        }\n    ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":31,"id":"link-relations"},"children":["Link Relations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["search"]},": Base search URL"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["next"]},": URL for the next page of results (includes page token)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["first"]},": URL for the first page"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["self"]},": Current page URL"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":32,"id":"pagination-examples"},"children":["Pagination Examples"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"__idx":33,"id":"initial-query"},"children":["Initial Query"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET [base]/Patient?_count=1\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"__idx":34,"id":"next-page-query"},"children":["Next Page Query"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET [base]/Patient?_count=1&_page_token=AUAcb7bUcVAqcd...\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":35,"id":"best-practices"},"children":["Best Practices"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Always specify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_count"]}," to control page size"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Store the complete ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_page_token"]}," for subsequent requests"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Handle cases where ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["next"]}," link might not be present (last page)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Don't modify other query parameters while paginating"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Page tokens are opaque and should not be modified"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":36,"id":"implementation-example"},"children":["Implementation Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"javascript","header":{"controls":{"copy":{}}},"source":"async function fetchAllPatients() {\n    let url = '[base]/Patient?_count=100';\n    let allResults = [];\n    \n    while (url) {\n        const response = await fetch(url);\n        const data = await response.json();\n        \n        // Add results to collection\n        allResults = allResults.concat(data.entry || []);\n        \n        // Find next page URL\n        const nextLink = data.link.find(link => link.relation === 'next');\n        url = nextLink ? nextLink.url : null;\n    }\n    \n    return allResults;\n}\n","lang":"javascript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"__idx":37,"id":"common-pagination-scenarios"},"children":["Common Pagination Scenarios"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"__idx":38,"id":"large-dataset-navigation"},"children":["Large Dataset Navigation"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# First page\nGET [base]/Patient?_count=100\n\n# Use next link from response for subsequent pages\nGET [base]/Patient?_count=100&_page_token=[token]\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"__idx":39,"id":"filtered-results-with-pagination"},"children":["Filtered Results with Pagination"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"# First page of filtered results\nGET [base]/Patient?_count=50&name=Smith\n\n# Subsequent pages maintain filters\nGET [base]/Patient?_count=50&name=Smith&_page_token=[token]\n","lang":"http"},"children":[]}]},"headings":[{"value":"FHIR R4 Query Guide","id":"fhir-r4-query-guide","depth":1},{"value":"Table of Contents","id":"table-of-contents","depth":2},{"value":"Patient Resource","id":"patient-resource","depth":2},{"value":"Overview","id":"overview","depth":3},{"value":"Key Elements","id":"key-elements","depth":3},{"value":"Basic Queries","id":"basic-queries","depth":3},{"value":"Common Filter Options","id":"common-filter-options","depth":3},{"value":"Coverage Resource","id":"coverage-resource","depth":2},{"value":"Overview","id":"overview-1","depth":3},{"value":"Key Elements","id":"key-elements-1","depth":3},{"value":"Basic Queries","id":"basic-queries-1","depth":3},{"value":"Common Filter Options","id":"common-filter-options-1","depth":3},{"value":"CarePlan Resource","id":"careplan-resource","depth":2},{"value":"Overview","id":"overview-2","depth":3},{"value":"Key Elements","id":"key-elements-2","depth":3},{"value":"Basic Queries","id":"basic-queries-2","depth":3},{"value":"Common Filter Options","id":"common-filter-options-2","depth":3},{"value":"Common Query Parameters","id":"common-query-parameters","depth":2},{"value":"Search Result Control","id":"search-result-control","depth":3},{"value":"Date Parameters","id":"date-parameters","depth":3},{"value":"String Parameters","id":"string-parameters","depth":3},{"value":"Advanced Query Techniques","id":"advanced-query-techniques","depth":2},{"value":"Chained Parameters","id":"chained-parameters","depth":3},{"value":"Combined Resources","id":"combined-resources","depth":3},{"value":"Composite Parameters","id":"composite-parameters","depth":3},{"value":"Multi-Resource Search","id":"multi-resource-search","depth":3},{"value":"Filtering Extensions","id":"filtering-extensions","depth":3},{"value":"Resource References","id":"resource-references","depth":3},{"value":"Pagination","id":"pagination","depth":2},{"value":"Overview","id":"overview-3","depth":3},{"value":"Response Structure","id":"response-structure","depth":3},{"value":"Link Relations","id":"link-relations","depth":3},{"value":"Pagination Examples","id":"pagination-examples","depth":3},{"value":"Initial Query","id":"initial-query","depth":4},{"value":"Next Page Query","id":"next-page-query","depth":4},{"value":"Best Practices","id":"best-practices","depth":3},{"value":"Implementation Example","id":"implementation-example","depth":3},{"value":"Common Pagination Scenarios","id":"common-pagination-scenarios","depth":3},{"value":"Large Dataset Navigation","id":"large-dataset-navigation","depth":4},{"value":"Filtered Results with Pagination","id":"filtered-results-with-pagination","depth":4}],"frontmatter":{"seo":{"title":"FHIR R4 Query Guide"}},"lastModified":"2024-12-02T22:18:37.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/fhir-query-guide","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}