### Generate Narratives for FHIR Examples (Batch) Source: https://github.com/nictiz/nictiz-stu3-zib2017/blob/stable-2.x/README.md This batch script regenerates narratives for FHIR examples using the Nictiz narrative generator. It requires Apache ANT to be installed and assumes the generator is available. The script is intended for use with examples provided in the 'Example' folder. ```batch @echo off call ant -f ./fhir-narrativegenerator/build.xml -Dinput.dir=./Example -Doutput.dir=./Example pause ``` -------------------------------- ### FHIR REST API Query Examples (Bash) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Demonstrates how to query FHIR resources, specifically AllergyIntolerance, MedicationRequest, and MedicationStatement, using REST API calls with various search parameters. Includes examples for searching by patient, status, and retrieving specific resources. ```bash # Search for all allergies for a specific patient curl -X GET "https://fhir-server.example.nl/fhir/AllergyIntolerance?patient=Patient/nl-core-patient-01" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" # Search for active allergies curl -X GET "https://fhir-server.example.nl/fhir/AllergyIntolerance?patient=Patient/nl-core-patient-01&clinical-status=active" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" # Search medication requests for a patient curl -X GET "https://fhir-server.example.nl/fhir/MedicationRequest?patient=Patient/nl-core-patient-01&category=http://snomed.info/sct|16076005" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" # Search medication usage statements curl -X GET "https://fhir-server.dev.example.nl/fhir/MedicationStatement?patient=Patient/nl-core-patient-01&status=completed" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" # Retrieve a specific patient resource curl -X GET "https://fhir-server.example.nl/fhir/Patient/nl-core-patient-01" \ -H "Accept: application/fhir+xml" \ -H "Authorization: Bearer YOUR_TOKEN" ``` -------------------------------- ### REST API Query Examples Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Examples of how to query FHIR resources using cURL, demonstrating searches for AllergyIntolerance, MedicationRequest, MedicationStatement, and retrieving Patient resources. ```APIDOC ## GET /fhir/AllergyIntolerance?patient={patientId} ### Description Search for all allergies for a specific patient. ### Method GET ### Endpoint /fhir/AllergyIntolerance ### Parameters #### Query Parameters - **patient** (reference) - Required - The patient the allergy intolerance belongs to. ### Request Example ```bash curl -X GET "https://fhir-server.example.nl/fhir/AllergyIntolerance?patient=Patient/nl-core-patient-01" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" ``` ## GET /fhir/MedicationRequest?patient={patientId}&category={categoryId} ### Description Search for medication requests for a patient, filtered by category. ### Method GET ### Endpoint /fhir/MedicationRequest ### Parameters #### Query Parameters - **patient** (reference) - Required - The patient for whom to retrieve medication requests. - **category** (token) - Required - The category of the medication request (e.g., SNOMED CT code). ### Request Example ```bash curl -X GET "https://fhir-server.example.nl/fhir/MedicationRequest?patient=Patient/nl-core-patient-01&category=http://snomed.info/sct|16076005" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" ``` ## GET /fhir/MedicationStatement?patient={patientId}&status={status} ### Description Search for medication statements for a patient, filtered by status. ### Method GET ### Endpoint /fhir/MedicationStatement ### Parameters #### Query Parameters - **patient** (reference) - Required - The patient for whom to retrieve medication statements. - **status** (token) - Required - The status of the medication statement (e.g., 'completed'). ### Request Example ```bash curl -X GET "https://fhir-server.example.nl/fhir/MedicationStatement?patient=Patient/nl-core-patient-01&status=completed" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" ``` ## GET /fhir/Patient/{patientId} ### Description Retrieve a specific patient resource by its ID. ### Method GET ### Endpoint /fhir/Patient/{patientId} ### Parameters #### Path Parameters - **patientId** (string) - Required - The ID of the patient to retrieve. ### Request Example ```bash curl -X GET "https://fhir-server.example.nl/fhir/Patient/nl-core-patient-01" \ -H "Accept: application/fhir+xml" \ -H "Authorization: Bearer YOUR_TOKEN" ``` ``` -------------------------------- ### FHIR Package Management and Validation (Bash) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Provides command-line instructions for managing FHIR packages and validating resources using the FHIR Package Manager and a validator CLI. Includes commands for installing packages, validating XML resources against specific versions and IGs, and generating narratives. ```bash # Install the package using FHIR Package Manager fhir install nictiz.fhir.nl.stu3.zib2017 # Validate a resource against the profiles java -jar validator_cli.jar patient-example.xml -version 3.0.2 -ig nictiz.fhir.nl.stu3.zib2017 # Generate narratives for examples ant -f build-addNarratives.xml ``` -------------------------------- ### AllergyIntolerance FHIR Resource Example (XML) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt An example of the AllergyIntolerance FHIR resource, conforming to the zib-AllergyIntolerance profile. It demonstrates how to capture patient allergies, including specific coding systems (like SNOMED CT), reaction details, and Dutch-specific extensions for clinical status and categorization. ```xml ``` -------------------------------- ### Medication Statement Example (FHIR XML) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt An example of a FHIR MedicationStatement resource conforming to the zib-MedicationUse profile. It details a patient's medication, dosage, timing, and status. Dependencies include FHIR core resources and specific Nictiz extensions. ```xml ``` -------------------------------- ### Medication Agreement FHIR Profile Example (XML) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt This XML snippet demonstrates the structure of a zib-MedicationAgreement resource according to the FHIR standard. It includes medication details, patient information, prescriber, and dosage instructions, utilizing specific extensions for Dutch healthcare context. ```xml ``` -------------------------------- ### Patient Profile Example (nl-core-patient) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt An example of the nl-core-patient profile, extending the base FHIR Patient resource to include Dutch healthcare specifics like BSN identifiers, Dutch address formats, and contact person relationships. This XML snippet demonstrates the structure and elements required for a Dutch patient record. ```xml
``` -------------------------------- ### NPM Package Dependencies (JSON) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Specifies the project's dependencies for FHIR implementation tools, including the nictiz.fhir.nl.stu3.zib2017 package and the core HL7 FHIR R3 specification. This is used for managing project dependencies via NPM. ```json { "name": "my-fhir-implementation", "dependencies": { "nictiz.fhir.nl.stu3.zib2017": "2.3.2", "hl7.fhir.r3.core": "3.0.2" } } ``` -------------------------------- ### Profile Validation Configuration (Java HAPI FHIR) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Configuration steps for using the Java HAPI FHIR validator to validate resources against the Dutch ZIB profiles provided by the nictiz.fhir.nl.stu3.zib2017 package. ```APIDOC ## Profile Validation Configuration ### Description This section details how to configure the HAPI FHIR validator in Java to use the Dutch ZIB profiles for resource validation. It involves setting up the `FhirContext`, `FhirValidator`, and loading profiles from an NPM package. ### Language Java ### Code Example ```java import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.validation.IValidationSupport; import ca.uhn.fhir.validation.ValidationResult; import ca.uhn.fhir.validation.FhirValidator; import ca.uhn.fhir.validation.IResourceValidator; import ca.uhn.fhir.validation.support.DefaultProfileValidationSupport; import ca.uhn.fhir.validation.support.PrePopulatedValidationSupport; import ca.uhn.fhir.validation.support.InMemoryTerminologyServerValidationSupport; import ca.uhn.fhir.validation.support.NpmPackageValidationSupport; // Assuming patientResource is a valid FHIR Resource object (e.g., Patient) // Resource patientResource = ...; // Initialize FHIR context for R3 FhirContext ctx = FhirContext.forR3(); // Create a validator instance FhirValidator validator = ctx.newValidator(); // Set up validation support chain IValidationSupport validationSupport = new ca.uhn.fhir.validation.support.ValidationSupportChain( new DefaultProfileValidationSupport(ctx), new PrePopulatedValidationSupport(ctx), new InMemoryTerminologyServerValidationSupport(ctx) ); // Load profiles from the nictiz.fhir.nl.stu3.zib2017 NPM package NpmPackageValidationSupport npmSupport = new NpmPackageValidationSupport(ctx); // Ensure the package path is correct relative to your classpath npmSupport.loadPackageFromClasspath("classpath:package/nictiz.fhir.nl.stu3.zib2017-2.3.2.tgz"); // Add the NPM package support to the validation chain validationSupport.addSupplier(npmSupport); // Set the validation support on the validator validator.setValidationSupport(validationSupport); // Validate the patient resource ValidationResult result = validator.validateWithResult(patientResource); // Check validation results if (result.isSuccessful()) { System.out.println("Validation successful"); } else { result.getMessages().forEach(message -> System.out.println(message.getSeverity() + ": " + message.getMessage()) ); } ``` ``` -------------------------------- ### HAPI FHIR Validator Configuration (Java) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Illustrates how to configure the HAPI FHIR validator in Java to use Dutch ZIB profiles for resource validation. It demonstrates loading profiles from an NPM package and performing validation against a patient resource. ```java // Java HAPI FHIR validator configuration FhirContext ctx = FhirContext.forR3(); FhirValidator validator = ctx.newValidator(); // Load the Dutch profiles IValidationSupport validationSupport = new ValidationSupportChain( new DefaultProfileValidationSupport(ctx), new PrePopulatedValidationSupport(ctx), new InMemoryTerminologyServerValidationSupport(ctx) ); // Load profiles from package NpmPackageValidationSupport npmSupport = new NpmPackageValidationSupport(ctx); npmSupport.loadPackageFromClasspath("classpath:package/nictiz.fhir.nl.stu3.zib2017-2.3.2.tgz"); // Validate patient resource against nl-core-patient profile ValidationResult result = validator.validateWithResult(patientResource); if (result.isSuccessful()) { System.out.println("Validation successful"); } else { result.getMessages().forEach(message -> System.out.println(message.getSeverity() + ": " + message.getMessage()) ); } ``` -------------------------------- ### AllergyIntolerance Server Capability Statement Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt This CapabilityStatement defines the requirements for a FHIR server to support the AllergyIntolerance use case as described for MedMij. It outlines the supported resource types, interactions, and search parameters. ```APIDOC ## GET /fhir/AllergyIntolerance ### Description Search for AllergyIntolerance resources. This endpoint allows querying for allergies associated with a specific patient and can be filtered by clinical status. ### Method GET ### Endpoint /fhir/AllergyIntolerance ### Parameters #### Query Parameters - **patient** (reference) - Required - The patient the allergy intolerance belongs to. - **clinical-status** (token) - Optional - The clinical status of the allergy intolerance. ### Request Example ```bash curl -X GET "https://fhir-server.example.nl/fhir/AllergyIntolerance?patient=Patient/nl-core-patient-01&clinical-status=active" \ -H "Accept: application/fhir+json" \ -H "Authorization: Bearer YOUR_TOKEN" ``` ### Response #### Success Response (200) - **Bundle** (Bundle) - A FHIR Bundle containing AllergyIntolerance resources matching the search criteria. #### Response Example (FHIR Bundle structure for AllergyIntolerance resources) ``` -------------------------------- ### AllergyIntolerance Server Capability Statement (XML) Source: https://context7.com/nictiz/nictiz-stu3-zib2017/llms.txt Defines the capabilities of a FHIR server for the AllergyIntolerance use case according to MedMij information standards. It specifies supported resources, interactions, search parameters, and profile references. ```xml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.