From 58992de35ba717116d21f02d01e4d83728a94072 Mon Sep 17 00:00:00 2001 From: Thiyan Arumugam Date: Tue, 3 Sep 2024 10:47:00 +0530 Subject: [PATCH] Address PR review feedback --- .../main/resources/template/cdsPackageMd.vm | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/native/cds-bal-template/src/main/resources/template/cdsPackageMd.vm b/native/cds-bal-template/src/main/resources/template/cdsPackageMd.vm index a7bb99e..cefb1f2 100644 --- a/native/cds-bal-template/src/main/resources/template/cdsPackageMd.vm +++ b/native/cds-bal-template/src/main/resources/template/cdsPackageMd.vm @@ -6,7 +6,7 @@ This is a ballerina template for the insurance payers who are developing the sol This will contain the CDS hooks as service. The [documentation](https://build.fhir.org/ig/HL7/davinci-crd/hooks.html#hook-categories) states: “The **primary** hooks are `Appointment Book`, `Orders Sign`, and `Order Dispatch`. CRD Servers SHALL, at minimum, return a Coverage Information system action for these hooks, even if the response indicates that further information is needed or that the level of detail provided is insufficient to determine coverage. The **secondary** hooks are `Orders Select`, `Encounter Start`, and `Encounter Discharge`. These hooks MAY return cards or system actions, but are not expected to, and CRD clients are free to ignore any cards or actions returned.” -The following features are implmented, +The following features are implemented, > 1. **CDS hooks as ballerina service**: All six hooks will be implemented as ballerina service. Since it is not mandatory to support all the hooks, the payer can define the relevant hooks for their services. `Config.bal` will contain all the hooks. > 2. **Ballerina Records for CRD**: All of the types will be implemented as ballerina records to support type safety. `health.fhir.cds.records.bal` contains the implemented records. > 3. **Methods to connect with Rule Repository**: These methods will be defined to connect the CDS service with the DDS server (Decision support systems). This will be used to process the received CDS request, prefetch the resources from the EHR repository (if needed), and construct the CDS response from the response received from the CRD server. `impl_decision_system_connection.bal` contains the interface to implement. @@ -18,34 +18,24 @@ The Developer needs to implement the `impl_decision_system_connection` methods t # How to use -## Prerequisites +#[[##]]# Prerequisites Before running this sample, make sure you have the following: - Download and install [Ballerina Swan Lake](https://ballerina.io/downloads/) 2201.8.5 or above. -## Getting Started +#[[##]]# Getting Started To get started with this sample, follow these steps: -1. Run ```bal new crd_service -t ballerinax/health.fhir.templates.crd``` -2. Navigate to crd_server folder. -3. Create a Config.toml file in the root level of the project. -3. Add the relevant CDS hooks to the Config.toml file. The property name should contains the fully qualified name with package name. Please check the sample below. -3. Complete the decision system connectivity implementation. The ```impl_decision_system_connection``` file contains placeholder functions that must be implemented to connect with external decision systems. Please follow the instructions in that file itself. +1. Complete the decision system connectivity implementation. The ```impl_decision_system_connection``` file contains placeholder functions that must be implemented to connect with external decision systems. Please follow the instructions in that file itself. + +2. Complete the feedback system connectivity implementation. The ```implFeedbackSystemConnection``` file contains placeholder functions that must be implemented to connect with external feedback systems. Please follow the instructions in that file itself. + +3. [Optional] By default this service will run in port 8080, if needed, you can change the port in the service.bal file. + 4. Run the project using the following command: ```bash $ bal run ``` - -### Sample Config.toml file -``` -[[ballerinax.health.fhir.cds.cds_services]] -hook = "patient-view" -title = "Static CDS Service Example" -description = "An example of a CDS Service that returns a static set of cards" -id = "static-patient-greeter" -[ballerinax.health.fhir.cds.cds_services.prefetch] -patientToGreet = "Patient/{{context.patientId}}" -```