### Examples: HL7v2 Endpoints Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides example implementations for various HL7v2 endpoint interactions using interceptors. ```APIDOC ## Examples: HL7v2 Endpoints ### Description Demonstrates how to leverage interceptors to customize the processing of HL7v2 messages and interactions within Smile CDR. ### Method POST ### Endpoint Examples related to HL7v2 endpoints. ### Parameters None specific to this example category. ### Request Example Refer to specific interceptor examples for request body details. ### Response Examples of HL7v2 processing results modified by interceptors. #### Response Example ``` MSH|^~\&|SMILE|CDR|LAB|LAB|202301011200||ADT^A01|MSG00001|P|2.5 EVN|A01|202301011200 PID|||12345^^^MRN||DOE^JOHN||19900101|M|... ``` ``` -------------------------------- ### Interceptor Example: Starter Storage Interceptor for STORAGE_xxx Pointcuts Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index A Java example of a starter interceptor for all STORAGE_xxx pointcuts in Smile CDR. This serves as a template for intercepting storage-related operations. ```java @Interceptor public class MyStorageInterceptor implements IResourceStorageInterceptor { @Hook(Pointcut.STORAGE_PRESTORAGE_RESOURCE) public void preStorage(IResourcePersistentId id, IBaseResource resource, StorageOperationType operationType) { log.info("About to store resource: " + resource.getIdElement().toUnqualifiedVersionlessString() + " Operation: " + operationType); } @Hook(Pointcut.STORAGE_POSTSTORAGE_RESOURCE) public void postStorage(IResourcePersistentId id, IBaseResource resource, StorageOperationType operationType) { log.info("Successfully stored resource: " + resource.getIdElement().toUnqualifiedVersionlessString() + " Operation: " + operationType); } } ``` -------------------------------- ### Examples: MDM Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides example implementations for customizing Master Data Management (MDM) operations using interceptors. ```APIDOC ## Examples: MDM ### Description Illustrates how interceptors can be applied to modify or observe resources before and after they are processed by the Master Data Management (MDM) module in Smile CDR. ### Method POST, PUT ### Endpoint Examples related to MDM operations. ### Parameters None specific to this example category. ### Request Example Refer to specific interceptor examples for request body details. ### Response Examples of MDM-processed resources, potentially altered by interceptors. #### Response Example ```json { "resourceType": "Patient", "id": "merged-patient-id", "meta": { "versionId": "2", "lastUpdated": "2023-01-01T14:00:00Z" }, "identifier": [ { "system": "http://hospital.example.com/mrn", "value": "MRN789" } ], "name": [ { "family": "Smith", "given": ["Jane", "Elizabeth"] } ] } ``` ``` -------------------------------- ### Examples: FHIR Client Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides example implementations for customizing FHIR client interactions using interceptors. ```APIDOC ## Examples: FHIR Client ### Description Demonstrates how interceptors can be used to modify outgoing requests made by the FHIR client within Smile CDR, such as adding custom headers or altering request parameters. ### Method GET, POST, PUT, DELETE ### Endpoint Examples related to FHIR client operations. ### Parameters None specific to this example category. ### Request Example Refer to specific interceptor examples for request body details. ### Response Examples of FHIR responses received by the client, potentially modified by interceptors. #### Response Example ```json { "resourceType": "Observation", "id": "obs-123", "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "8310-5" } ] }, "subject": { "reference": "Patient/pat-456" } } ``` ``` -------------------------------- ### Interceptor Example: Starter Server Interceptor for SERVER_xxx Pointcuts Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index A Java example demonstrating a starter interceptor for all SERVER_xxx pointcuts in Smile CDR. This provides a basic template for intercepting server-level operations. ```java @Interceptor public class MyServerInterceptor implements IServerInterceptor { @Hook(Pointcut.SERVER_INCOMING_REQUEST) public void incomingRequest(HttpServletRequest request) { log.info("Incoming request: " + request.getMethod() + " " + request.getRequestURI()); } @Hook(Pointcut.SERVER_OUTGOING_RESPONSE) public void outgoingResponse(HttpServletResponse response) { log.info("Outgoing response status: " + response.getStatus()); } } ``` -------------------------------- ### Examples: FHIR Storage Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides example implementations for customizing FHIR storage operations using interceptors. ```APIDOC ## Examples: FHIR Storage ### Description Showcases how interceptors can be used to enhance or modify the way FHIR resources are stored and retrieved from the Smile CDR database. ### Method POST, PUT, DELETE, GET ### Endpoint Examples related to FHIR storage operations. ### Parameters None specific to this example category. ### Request Example Refer to specific interceptor examples for request body details. ### Response Examples of FHIR resources as stored or retrieved, potentially modified by interceptors. #### Response Example ```json { "resourceType": "Patient", "id": "example-patient-id", "meta": { "tag": [ { "system": "http://smilecdr.com/tag", "code": "server-reserved" } ] }, "name": [ { "family": "Doe", "given": ["John"] } ] } ``` ``` -------------------------------- ### Interceptor Example: Starter Gateway Interceptor for FHIRGW_xxx Pointcuts Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index A Java example of a starter interceptor for all FHIRGW_xxx pointcuts in Smile CDR. This provides a template for intercepting FHIR gateway operations. ```java @Interceptor public class MyGatewayInterceptor implements IFhirGatewayInterceptor { @Hook(Pointcut.FHIRGW_TARGET_REQUEST) public void targetRequest(IRequest request) { log.info("FHIR Gateway target request: " + request.getOperation()); } @Hook(Pointcut.FHIRGW_TARGET_RESPONSE) public void targetResponse(IResponse response) { log.info("FHIR Gateway target response status: " + response.getStatus()); } } ``` -------------------------------- ### Examples: FHIR Endpoints Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides example implementations for various FHIR endpoint interactions using interceptors. ```APIDOC ## Examples: FHIR Endpoints ### Description Illustrates how to use interceptors to customize the behavior of FHIR endpoints, such as overriding CapabilityStatement generation or implementing custom logic for resource retrieval. ### Method GET, POST, PUT, DELETE ### Endpoint Examples related to FHIR endpoints. ### Parameters None specific to this example category. ### Request Example Refer to specific interceptor examples for request body details. ### Response Examples of responses modified by interceptors. #### Response Example ```json { "resourceType": "CapabilityStatement", "fhirVersion": "4.0.1", "acceptUnknown": "extensible", "implementation": { "description": "Smile CDR with custom CapabilityStatement" } } ``` ``` -------------------------------- ### Examples: FHIR Gateway Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides example implementations for customizing FHIR gateway interactions using interceptors. ```APIDOC ## Examples: FHIR Gateway ### Description Illustrates how interceptors can modify the behavior of the FHIR gateway, enabling custom routing, search parameter manipulation, and response alteration. ### Method GET, POST, PUT, DELETE ### Endpoint Examples related to FHIR gateway operations. ### Parameters None specific to this example category. ### Request Example Refer to specific interceptor examples for request body details. ### Response Examples of FHIR responses processed through the gateway, potentially modified by interceptors. #### Response Example ```json { "resourceType": "Bundle", "total": 1, "entry": [ { "resource": { "resourceType": "Patient", "id": "alternate-id", "name": [ { "family": "Smith", "given": ["Jane"] } ] } } ] } ``` ``` -------------------------------- ### Product Configuration Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints and documentation for configuring the product, including HTTP server setup and TLS/HTTPS settings. ```APIDOC ## Product Configuration ### Description This section details the configuration options for the Smile CDR product, focusing on HTTP server setup and TLS/HTTPS. ### HTTP Server Setup - **Respecting Forward Headers**: Configuration for handling proxy headers. - **Specifying a Custom Context Path**: How to set a custom context path for the server. - **Access Logs**: Configuration for access logging. - **Frame Options**: Settings for controlling clickjacking protection. ### TLS and HTTPS Reference - **Background**: Explanation of TLS/HTTPS in Smile CDR. - **Creating a Self-Signed KeyStore**: Guide to creating self-signed certificates. - **Importing a LetsEncrypt Certificate into a KeyStore**: Instructions for using Let's Encrypt certificates. - **Selecting Ciphers and Protocol**: Configuring TLS ciphers and protocols. - **Enabling TLS Mutual Authentication (Client Auth)**: Setting up client certificate authentication. - **Programmatically Configuring a FHIR Endpoint KeyStore**: Programmatic configuration of KeyStores. - **Smile Util TLS JSON Authentication File**: Using JSON files for TLS authentication. ``` -------------------------------- ### Interceptor Example: Starter Client Interceptor for CLIENT_xxx Pointcuts Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index A Java example of a starter interceptor for all CLIENT_xxx pointcuts in Smile CDR. This serves as a template for intercepting FHIR client operations. ```java @Interceptor public class MyClientInterceptor implements IFhirClientInterceptor { @Hook(Pointcut.CLIENT_REQUEST) public void clientRequest(IRequest request) { log.info("FHIR Client request: " + request.getOperation()); } @Hook(Pointcut.CLIENT_RESPONSE) public void clientResponse(IResponse response) { log.info("FHIR Client response status: " + response.getStatus()); } } ``` -------------------------------- ### Example LiveBundle Javascript Code Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides an example of how to implement LiveBundle functionality using Javascript. This snippet demonstrates the basic structure and syntax for creating LiveBundle rules or scripts within the Smile CDR environment. It may require specific Smile CDR API knowledge to utilize effectively. ```javascript function processBundle(bundle) { // Logic to process the incoming bundle console.log('Processing bundle:', bundle); // Example: Filter resources based on a condition const filteredResources = bundle.entry.filter(entry => entry.resource.resourceType === 'Patient'); // Return a modified bundle or specific data return { ...bundle, entry: filteredResources }; } ``` -------------------------------- ### Subscription Channel Type: Email Example Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Configuration example for an 'email' channel type for Smile CDR Subscriptions. This enables notifications to be sent to a specified email address. ```json { "resourceType": "Subscription", "id": "example-email", "status": "active", "channel": { "type": "email", "address": "mailto:user@example.com" }, "criteria": "Patient?identifier=http://hospital.example.org|12345" } ``` -------------------------------- ### Example Transaction Log JSON Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Demonstrates the format of a transaction log entry in JSON. This example shows the data recorded for each transaction, including request details, response information, and performance metrics. It is crucial for debugging and performance analysis. ```json { "transactionId": "txn-abcde12345", "timestamp": "2023-10-27T11:00:00Z", "request": { "method": "POST", "url": "/fhir/Patient", "headers": { "Content-Type": "application/fhir+json" }, "body": "{...}" }, "response": { "statusCode": 201, "headers": { "Location": "/fhir/Patient/patient-456" }, "durationMs": 150 }, "outcome": "SUCCESS" } ``` -------------------------------- ### Example Audit Log JSON Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Illustrates the structure and content of an audit log entry in JSON format. This example helps in understanding the type of information captured for auditing purposes, such as user actions, timestamps, and resource modifications. It's useful for security monitoring and compliance. ```json { "timestamp": "2023-10-27T10:30:00Z", "user": "admin", "action": "UPDATE_PATIENT", "resourceType": "Patient", "resourceId": "patient-123", "details": { "field": "gender", "oldValue": "male", "newValue": "female" } } ``` -------------------------------- ### Interceptor Example: JavaScript Storage Interceptor Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index An example of a JavaScript interceptor for FHIR storage in Smile CDR. This allows for custom logic to be executed during resource storage operations. ```javascript function beforeCreate(context) { var resource = context.resource; if (resource.resourceType === 'Patient') { log.info('Creating a Patient resource: ' + resource.id); // Add custom logic here, e.g., validation or modification } return resource; } function afterCreate(context) { var resource = context.resource; log.info('Patient resource created: ' + resource.id); // Add custom logic here, e.g., auditing or triggering other events } ``` -------------------------------- ### Subscription Channel Type: Rest Hook Example Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index An example configuration for a 'rest-hook' channel type for Smile CDR Subscriptions. This allows notifications to be sent to a specified endpoint via HTTP POST. ```json { "resourceType": "Subscription", "id": "example-resthook", "status": "active", "channel": { "type": "rest-hook", "endpoint": "http://example.com/my-notification-endpoint" }, "criteria": "Observation?code=http://loinc.org|80586-2" } ``` -------------------------------- ### Java Execution Environment Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Documentation related to the Java execution environment within Smile CDR, including security attributes, library support, exception handling, Javadocs, and examples. ```APIDOC ## Java Execution Environment ### Description This section provides information about the Java execution environment, covering security, libraries, exceptions, and Javadocs. ### Key Areas - **Security Attributes**: Details on security aspects within the Java environment. - **Library Support**: Information on supported Java libraries. - **Exception Handling**: How exceptions are managed in the Java environment. - **Javadocs**: Access to Smile CDR Javadocs. - **Examples**: Code examples, including database access using JDBC. ``` -------------------------------- ### Module Configuration Management via JSON Admin API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index This outlines the JSON Admin API endpoints for managing module configurations in Smile CDR. It includes functionalities to fetch module types, prototypes, specific configurations, and to create, set, start, stop, restart, archive, and reinstate modules. ```http # Example: Fetching all module types GET /admin/moduleconfig/types HTTP/1.1 Host: localhost:8080 # Example: Fetching the prototype for a specific module GET /admin/moduleconfig/prototype/my-module-type HTTP/1.1 Host: localhost:8080 # Example: Fetching the configuration for a single module GET /admin/moduleconfig/config/my-module-instance HTTP/1.1 Host: localhost:8080 # Example: Creating a new module instance POST /admin/moduleconfig/module HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "moduleType": "my-module-type", "instanceName": "my-new-module" } # Example: Setting module configuration PUT /admin/moduleconfig/config/my-new-module HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "someProperty": "someValue" } # Example: Starting a module POST /admin/moduleconfig/start/my-new-module HTTP/1.1 Host: localhost:8080 # Example: Stopping a module POST /admin/moduleconfig/stop/my-new-module HTTP/1.1 Host: localhost:8080 # Example: Archiving a module POST /admin/moduleconfig/archive/my-new-module HTTP/1.1 Host: localhost:8080 ``` -------------------------------- ### Interceptor Example: Operate on Resources Analyzed by MDM Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index A Java code snippet demonstrating an interceptor that operates on resources before and after they are analyzed by the MDM (Master Data Management) module in Smile CDR. ```java @Interceptor public class MdmResourceInterceptor implements IMdmResourceInterceptor { @Hook(Pointcut.MDM_RESOURCE_ANALYSED_BEFORE) public void beforeMdmAnalysis(IBaseResource resource) { log.info("MDM analysis - Before: Resource type " + resource.getResourceType() + " ID " + resource.getIdElement()); // Modify resource before MDM analysis if needed } @Hook(Pointcut.MDM_RESOURCE_ANALYSED_AFTER) public void afterMdmAnalysis(IBaseResource resource) { log.info("MDM analysis - After: Resource type " + resource.getResourceType() + " ID " + resource.getIdElement()); // Operate on resource after MDM analysis, e.g., update flags or trigger events } } ``` -------------------------------- ### Interceptor Example: Override CapabilityStatement Generation Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index A Java code snippet demonstrating how to override the CapabilityStatement generation using an interceptor in Smile CDR. This allows customization of the server's conformance information. ```java public class CustomCapabilityStatementInterceptor implements ICapabilityStatementStorageInterceptor { @Override public void storage(IPrimitiveType theValidUntil, IPrimitiveType theLastUpdated, org.hl7.fhir.r4.model.CapabilityStatement theCapabilityStatement) { // Modify the CapabilityStatement here theCapabilityStatement.setSoftware(new CapabilityStatement.CapabilityStatementSoftwareComponent() .setName("My Custom Smile CDR") .setVersion("1.0.0")); } } ``` -------------------------------- ### Smileutil CSV Bulk Import File Functionality Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index This describes the `smileutil` command-line utility for processing CSV files for bulk import into Smile CDR. It allows for the creation and processing of CSV files that can be ingested via the Bulk Import Endpoint, facilitating large-scale data loading. ```bash # Example usage of smileutil for CSV bulk import # This is a conceptual example as the exact command syntax may vary. smileutil csv-import --file /path/to/your/data.csv --endpoint http://localhost:8080/bulk/import --username admin --password password ``` -------------------------------- ### JavaScript Execution Environment Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Documentation for the JavaScript execution environment, including configuration, remote debugging, ECMA modules, and various APIs. ```APIDOC ## JavaScript Execution Environment ### Description This section details the JavaScript execution environment, covering its setup, debugging, module system, and available APIs. ### Key Features - **Introduction**: Overview of the JavaScript environment. - **Configuration**: How to specify JavaScript in the configuration file. - **Remote Debugging**: Setting up remote debugging for JavaScript code. - **ECMA Modules (import)**: Support for ES modules. ### APIs - **Converter API**: Methods for data conversion (e.g., `hl7v2TsToFhirDate`, `urlDecodeString`, `base64Encode`). - **Environment API**: Methods for accessing environment properties (e.g., `getProperty`, `getEnv`). - **Exceptions API**: Methods for creating trusted exceptions (e.g., `Exceptions.newTrustedException`). - **OAuth2 Exceptions API**: Specific exceptions related to OAuth2. ``` -------------------------------- ### System Config Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints for accessing and managing system configuration. ```APIDOC ## System Config Endpoint ### Description This section details the API endpoints for system configuration. ### Endpoints - **GET /system/config**: (Specific endpoint details not provided in the input) - **PUT /system/config**: (Specific endpoint details not provided in the input) ``` -------------------------------- ### OpenID Connect Client Management via JSON Admin API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index This documentation covers the JSON Admin API endpoints for managing OpenID Connect (OIDC) clients in Smile CDR. It enables the retrieval, creation, and updating of OIDC client definitions, including the generation of secrets for secure authentication. ```http # Example: Fetching all OIDC client definitions GET /admin/oidc/clients HTTP/1.1 Host: localhost:8080 # Example: Fetching an individual client by ID GET /admin/oidc/clients/my-client-id HTTP/1.1 Host: localhost:8080 # Example: Creating a new OIDC client POST /admin/oidc/clients HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "clientId": "new-client", "clientSecret": "generated-secret", "redirectUris": ["http://localhost:3000/callback"] } # Example: Updating an existing OIDC client PUT /admin/oidc/clients/my-client-id HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "clientSecret": "updated-secret" } # Example: Creating a client and generating secrets POST /admin/oidc/clients/generate-secret HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "clientId": "client-with-new-secret" } ``` -------------------------------- ### Version Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoint for retrieving the system version information. ```APIDOC ## Version Endpoint ### Description This endpoint provides information about the current version of the Smile CDR system. ### Endpoints - **GET /version**: Fetch Version Information ``` -------------------------------- ### OpenID Connect Keystore Management via JSON Admin API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index This section describes the JSON Admin API endpoints for managing OpenID Connect (OIDC) keystores in Smile CDR. It provides functionalities to fetch, create, update, and delete OIDC keystore definitions, which are essential for OIDC security operations. ```http # Example: Fetching all OIDC keystore definitions GET /admin/oidc/keystores HTTP/1.1 Host: localhost:8080 # Example: Fetching an OIDC keystore definition by ID GET /admin/oidc/keystores/my-keystore-id HTTP/1.1 Host: localhost:8080 # Example: Creating a new OIDC keystore definition POST /admin/oidc/keystores HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "keystoreId": "new-keystore", "privateKey": "-----BEGIN PRIVATE KEY...", "certificate": "-----BEGIN CERTIFICATE..." } # Example: Updating an OIDC keystore definition PUT /admin/oidc/keystores/my-keystore-id HTTP/1.1 Host: localhost:8080 Content-Type: application/json { "certificate": "-----BEGIN UPDATED CERTIFICATE..." } # Example: Deleting an OIDC keystore definition DELETE /admin/oidc/keystores/my-keystore-id HTTP/1.1 Host: localhost:8080 ``` -------------------------------- ### Util API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Utility methods for common operations. ```APIDOC ## Util API ### Description Utility methods for common operations. ### Methods - **sleep(millis)**: Pauses execution for a specified number of milliseconds. ``` -------------------------------- ### Subscription API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Documentation for managing and configuring subscriptions within Smile CDR, including channel types, delivery options, and manual triggering. ```APIDOC ## Subscription API ### Description Enables the creation, management, and delivery of real-time notifications for data changes or events within the Smile CDR system. ### Method GET, POST, PUT, DELETE ### Endpoint /Subscription ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the subscription resource. #### Query Parameters - **_pretty** (boolean) - Optional - Returns pretty-printed JSON. #### Request Body - **Subscription** (object) - Required - The subscription resource definition, including criteria, channel type, and endpoint. ### Request Example ```json { "resourceType": "Subscription", "criteria": "Observation?code=http://loinc.org|29463-7", "channel": { "type": "rest-hook", "endpoint": "http://example.com/callback" } } ``` ### Response #### Success Response (200) - **Subscription** (object) - The created or updated subscription resource. - **Bundle** (object) - A bundle of subscription resources. #### Response Example ```json { "resourceType": "Subscription", "id": "123", "status": "active", "criteria": "Observation?code=http://loinc.org|29463-7", "channel": { "type": "rest-hook", "endpoint": "http://example.com/callback" } } ``` ``` -------------------------------- ### ETL Import Row Handling in Smile CDR Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index This snippet demonstrates the `handleEtlImportRow` function used in Smile CDR's ETL (Extract/Transform/Load) import module. It processes a single row of data from an input map within a given context, allowing for custom data transformation and validation during the import process. ```javascript /** * Handles a single row during ETL import. * @param {Map} theInputMap - A map representing the input row data. * @param {object} theContext - The execution context for the import job. * @returns {Promise>} - A promise that resolves with the transformed input map. */ async function handleEtlImportRow(theInputMap, theContext) { // Example: Transform a field if (theInputMap.has('patientName')) { const originalName = theInputMap.get('patientName'); theInputMap.set('patientName', originalName.toUpperCase()); } // Example: Add a new field theInputMap.set('importTimestamp', new Date().toISOString()); // Return the modified map for further processing return theInputMap; } ``` -------------------------------- ### Troubleshooting Log Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints for managing troubleshooting log configurations and levels. ```APIDOC ## Troubleshooting Log Endpoint ### Description This section details the API endpoints for managing troubleshooting logs. ### Endpoints - **GET /log/troubleshooting/config**: Fetch Troubleshooting Log Configuration - **PUT /log/troubleshooting/level**: Update Troubleshooting Logger Level - **PUT /log/troubleshooting/config**: Update Troubleshooting Log Configuration ``` -------------------------------- ### HFQL: Direct SQL Access Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints and documentation for accessing the FHIR repository using HFQL (High-Frequency Query Language) which supports SQL-like syntax. ```APIDOC ## HFQL: Direct SQL Access ### Description This section covers the HFQL (High-Frequency Query Language) which allows direct SQL-like access to the FHIR repository. It includes an overview, goals, architecture, JDBC driver information, and syntax details. ### Endpoints - **POST /hfql**: Direct SQL Access to the FHIR Repository ### Documentation - **Overview**: General introduction to HFQL. - **Goals and Architecture**: Explains the purpose and design of HFQL. - **JDBC Driver**: Information on how to use the HFQL JDBC driver. - **Enabling Server Support**: How to configure the server to support HFQL. - **SQL Syntax**: Detailed syntax for HFQL queries, including SELECT, WHERE, and limitations. - **Examples**: Practical examples of HFQL queries. ``` -------------------------------- ### OpenID Connect Servers Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints related to OpenID Connect server definitions, including fetching, finding, creating, and updating definitions. ```APIDOC ## OpenID Connect Servers Endpoint ### Description This section details the API endpoints for managing OpenID Connect server definitions. ### Endpoints - **GET /oidc/server**: Fetch All OpenID Connect Server Definitions - **GET /oidc/server/{id}**: Find OpenID Connect Server Definition by ID - **POST /oidc/server**: Create OpenID Connect Server Definition - **PUT /oidc/server/{id}**: Update OpenID Connect Server Definition ``` -------------------------------- ### Log API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Provides methods for logging messages at different severity levels. ```APIDOC ## Log API ### Description Provides methods for logging messages at different severity levels. ### Methods - **debug(string)**: Logs a message at the debug level. - **info(string)**: Logs a message at the info level. - **warn(string)**: Logs a message at the warning level. - **error(string)**: Logs a message at the error level. ``` -------------------------------- ### OpenID Connect Sessions Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints for managing OpenID Connect sessions, including fetching active clients, revoking clients, and revoking all tokens. ```APIDOC ## OpenID Connect Sessions Endpoint ### Description This section details the API endpoints for managing OpenID Connect sessions and user tokens. ### Endpoints - **GET /oidc/session/user/{userId}/clients**: Fetch All Active Clients for User - **DELETE /oidc/session/user/{userId}/client/{clientId}**: Revoke Active Client for User - **DELETE /oidc/session/user/{userId}/tokens**: Revoke All Tokens for User ``` -------------------------------- ### Terminology Operations: Apply Codesystem Delta Add Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Demonstrates the $apply-codesystem-delta-add operation for adding deltas to external code systems. This operation is part of the terminology management features in Smile CDR. ```json { "resourceType": "Parameters", "parameter": [ { "name": "delta", "resource": { "resourceType": "CodeSystem", "id": "example-delta", "content": "not-present", "concept": [ { "code": "C100", "display": "New Concept 1" } ] } } ] } ``` -------------------------------- ### User Management Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints for managing users, including searching, creating, updating, and managing authentication details. ```APIDOC ## User Management Endpoint ### Description This section details the API endpoints for user management operations. ### Endpoints - **GET /user**: Search for Users (All Modules) - **GET /user/module/{moduleName}**: Search for Users (Specific Module) - **POST /user**: Create User - **PUT /user/{userId}**: Update User - **PUT /user/{userId}/password**: Update Password - **PUT /user/me/password**: Update Own Password - **PUT /user/me/launch-contexts**: Update Own Default Launch Contexts - **POST /user/me/2fa/key**: 2FA: Create New Key - **GET /user/me/2fa/qrcode**: 2FA: Generate QR Code - **POST /user/me/2fa/key/confirm**: 2FA: Confirm Key - **DELETE /user/me/2fa/key**: 2FA: Delete Key - **GET /user/authorities**: Get Available Authorities - **DELETE /user/sessions**: Invalidate All Sessions ``` -------------------------------- ### Interceptors API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Details on how to implement and deploy interceptors in Smile CDR to customize request and response processing for various modules like FHIR, HL7v2, Storage, Gateway, and Client. ```APIDOC ## Interceptors API ### Description Allows for the injection of custom logic into the request and response processing pipeline of Smile CDR for various modules. ### Method POST, PUT, DELETE ### Endpoint /interceptors ### Parameters #### Path Parameters - **module** (string) - Required - The module to which the interceptor applies (e.g., FHIR, HL7v2, Storage, Gateway, Client, MDM). - **id** (string) - Required - The ID of the interceptor. #### Query Parameters None #### Request Body - **InterceptorDefinition** (object) - Required - The definition of the interceptor, including its type, configuration, and the pointcuts it subscribes to. ### Request Example ```json { "resourceType": "Interceptor", "module": "FHIR", "type": "JavaScript", "script": "// Your JavaScript code here", "pointcuts": ["SERVER_RESOURCE_GET"] } ``` ### Response #### Success Response (200) - **Interceptor** (object) - The deployed interceptor configuration. #### Response Example ```json { "resourceType": "Interceptor", "id": "my-js-interceptor", "module": "FHIR", "type": "JavaScript", "status": "active" } ``` ``` -------------------------------- ### CDA Exchange Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Manage CDA templates, including creation, updates, viewing, and deletion. ```APIDOC ## CDA Exchange Endpoint ### Description This endpoint provides functionality to manage CDA (Clinical Document Architecture) templates, allowing for their creation, modification, retrieval, and deletion. ### Method - POST: Create CDA Template - PUT: Update CDA Template - GET: View CDA Template(s) - DELETE: Delete CDA template ### Endpoint `/api/v1/admin/cda-exchange` ### Parameters #### Request Body (for POST/PUT) - **templateName** (string) - Required - The name of the CDA template. - **templateScript** (string) - Required - The script content for the CDA template. #### Query Parameters (for GET) - **name** (string) - Optional - Filter templates by name. ### Request Example (Create CDA Template) ```json { "templateName": "MyCDATemplate", "templateScript": "..." } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **templates** (array) - List of CDA templates (for GET requests). ``` -------------------------------- ### Terminology Operations: Apply Codesystem Delta Remove Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Illustrates the $apply-codesystem-delta-remove operation for removing deltas from external code systems. This is crucial for managing vocabulary updates and corrections. ```json { "resourceType": "Parameters", "parameter": [ { "name": "delta", "resource": { "resourceType": "CodeSystem", "id": "example-delta", "content": "not-present", "concept": [ { "code": "C100" } ] } } ] } ``` -------------------------------- ### Logging API Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints for managing and troubleshooting logs, including audit, transaction, and system logs. ```APIDOC ## Logging API Endpoints ### Description APIs for managing various types of logs within Smile CDR, including audit logs, transaction logs, system logs, and troubleshooting logs for different modules. ### Endpoints - `35.0.0` | Logging - `35.0.1` | Overview - `35.0.2` | Audit and Transaction Logs - `35.1.0` | Audit Log - `35.1.1` | Audit Log - `35.1.2` | Audit Log Configuration - `35.1.3` | Disabling the Audit Log - `35.1.4` | Example Audit Log Json - `35.1.5` | Audit Module - `35.2.0` | Transaction Log - `35.2.1` | Transaction Log - `35.2.2` | Cluster Manager Transaction Log Storage - `35.2.3` | Transaction Log Persistence Module - `35.2.4` | Transaction Log Broker Module - `35.2.5` | Example Transaction Log JSON - `35.2.6` | What Does the Transaction Log Store? - `35.2.7` | Transaction Log Configuration - `35.2.8` | Controlling Transaction Log Events - `35.2.9` | Performance Tracing - `35.2.10` | Event Types and SubTypes - `35.2.11` | Transaction Storage Outcomes - `35.2.12` | Hiding Request Body - `35.2.13` | Changing Timezone - `35.2.14` | Using Multiple Transaction Logs - `35.3.0` | System Logging - `35.3.1` | System Logging - `35.3.2` | Changing Logging Settings - `35.3.3` | Protected Health Information (PHI) in Logs - `35.3.4` | JVM Stats Logging - `35.4.0` | Troubleshooting Logs - `35.4.1` | Troubleshooting Logs - `35.4.2` | Docker Considerations - `35.4.3` | Troubleshooting Logs Endpoint - `35.4.4` | CDA Exchange+ Troubleshooting Log - `35.4.5` | Consent Module Troubleshooting Log - `35.4.6` | HL7V2 Troubleshooting Log - `35.4.7` | HTTP Troubleshooting Log - `35.4.8` | Partition Troubleshooting Log - `35.4.9` | Security Troubleshooting Log - `35.4.10` | Subscription Troubleshooting Log - `35.4.11` | LiveBundle Troubleshooting Log - `35.4.12` | MDM Troubleshooting Log - `35.4.13` | Channel Import Troubleshooting Log - `35.4.14` | Realtime Export Troubleshooting Log - `35.4.15` | FHIR Gateway Troubleshooting Log - `35.4.16` | Connection Pool Troubleshooting Log - `35.4.17` | Batch Framework Troubleshooting Log - `35.4.18` | Narrative Generation Troubleshooting Log - `35.4.19` | Terminology Troubleshooting Log ``` -------------------------------- ### Runtime Status Endpoint Source: https://smilecdr.com/docs/welcome/table_of_contents.html/index Endpoints for retrieving runtime status and health information for the system. ```APIDOC ## Runtime Status Endpoint ### Description This section details the API endpoints for retrieving runtime status and health information. ### Endpoints - **GET /status/node**: Fetch Complete Node Status Information - **GET /status/health**: Fetch All Runtime Health Checks ```