Janus
0.1.1 - ci-build

Janus - Local Development build (v0.1.1) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

User Guide

Welcome to the User Guide for the Janus Application!

We are delighted to present the comprehensive user guide for the Janus Application, your ultimate companion for harnessing the power of Fast Healthcare Interoperability Resources (FHIR®) in the realm of data mapping and questionnaire management. This guide is meticulously crafted to walk you through every aspect of navigating the Janus Application with proficiency and confidence.

In this rapidly evolving landscape of healthcare technology, the adoption of FHIR® as the standard for exchanging healthcare information has revolutionized the way data is shared, managed, and utilized across the industry. The Janus Application seamlessly integrates FHIR® into its environment, empowering you to ensure the robustness, security, and interoperability of your healthcare applications with unparalleled ease.

In this guide, we will delve into a comprehensive exploration of the Janus Application's functionalities, step-by-step instructions to set up your environment, strategies to create and manage FHIR® StructureMap and Questionnaires. By the end of this guide, you will be empowered to wield the Janus Application effectively, harnessing its capabilities to elevate your healthcare data management endeavors.

Navigating the Janus Homepage: Language Selection and Tabs Exploration

Welcome to the Janus Homepage!

As you embark on your journey of healthcare data management excellence, the Janus homepage awaits you with a range of powerful features and tools. Here's a guide to help you make the most of your experience:

image
Figure 1: Home page


Language Selection:

At the bottom right corner of the homepage, you'll find a language switcher. This allows you to seamlessly toggle between French and English, choosing the language that suits your preferences. Whether you're more comfortable in English or French, the Janus Application ensures that language isn't a barrier to your testing and exploration.

Tab Overview:

  1. Structure Maps : The Structure Maps tab provides tools for creating, modifying, and managing FHIR® StructureMap resources. These resources facilitate the transformation of healthcare data according to FHIR® R4 standards.

  2. Questionnaires : The Questionnaires tab offers comprehensive functionalities for creating and managing FHIR® Questionnaires, as well as generating QuestionnaireResponses from completed questionnaires. These tools support the collection and validation of clinical and administrative data.

  3. Log In icon: The "Log In icon" tab lets you log in as an administrator (not available at present) or as a simple user, giving you access to the entire Application.

Logging In and Registration Process on the Janus Application

image image
Figure 2: Connection. Figure 3: Registration


Logging In:

To access the wealth of features and capabilities within the Janus Application, follow these simple steps to log in using your email and password:

  • Navigate to the Login Page: Open your web browser and visit the Janus's login page on the top right corner of the homepage, login menu.

  • Enter Your Credentials: Input your registered email address and the corresponding password into the designated fields.

  • Click "Sign In": Once your email and password are entered correctly, click the "Sign In" button to proceed.

  • Exploring the Application: You're now successfully logged in! Explore the diverse tools, simulations, and testing options available to you on the Janus Application.

Registration:

If you're new to the Janus Application and need to create an account, the registration process is quick and straightforward. Here's what you need to do:

  • Navigate to the Login Page: Open your web browser and access the Janus's login page on the top right corner of the homepage, login menu.

  • Click "Register": Beneath the login fields, you'll find a "Register" button. Click on it to initiate the registration process.

  • Provide Your Information: You'll be directed to a registration form where you'll need to provide essential details such as your name, email address, desired password, and any other necessary information.

  • Complete the Registration: After filling out the required fields, review the information for accuracy and completeness.

  • Click "Register": Once you're satisfied with the provided information, click the "Register" button to finalize your registration.

Verification (if applicable): Depending on the Application's setup, you might receive a verification email. If required, follow the instructions in the email to verify your account.

  • Logging In: After successful registration, use the email and password you provided during registration to log in to the Janus Application.

StructureMaps Page

image
Figure 3: StructureMap.


Search Criteria Section

At the top of the StructureMaps page, there is a Search Criteria section that allows users to filter and find specific StructureMap entries. This section includes the following fields:

  • ID: A text input field where users can enter the unique identifier of the StructureMap they are looking for.
  • Name: A text input field to search for StructureMaps by name.
  • Status: A dropdown menu to filter StructureMaps based on their status. Users can select a status from the list.

Below these fields, there are two buttons:

  • Search: A red button to initiate the search based on the entered criteria.
  • Reset: A dark gray button to clear the search fields and reset the criteria.

StructureMaps List

Below the search criteria section, there is a table listing all the StructureMap entries that match the search criteria. This table includes the following columns:

  • ID: The unique identifier of the StructureMap.
  • Name: A brief description of what the StructureMap does.
  • Status: The current status of the StructureMap (e.g., DRAFT).
  • Actions: Icons for editing and viewing the StructureMap. The pencil icon is for editing, and the play icon is for viewing or executing the StructureMap.

Pagination

At the bottom of the page, there is a pagination control that allows users to navigate through multiple pages of StructureMap entries. Users can select the number of entries displayed per page using a dropdown menu (e.g., 10, 20, 50), and navigate between pages using the left and right arrow buttons or by selecting a specific page number.

StructureMaps Page Launch

Welcome to the StructureMap Page Launch!

image
Figure 4: Launch StructureMap.


Informations Section

Directly below the header, there is an Informations section that provides details about the selected StructureMap:

  1. ID:
    • Description: This is a unique identifier for the StructureMap. It helps to distinguish this StructureMap from others and is crucial for reference and retrieval.
      Example: StructureMap/example-structuremap-id
  2. Name:
    • Description: The name of the StructureMap. This is a human-readable string that provides a brief title or label for the StructureMap.
      Example: Patient Data Transformation Map
  3. Status:
    • Description: The current status of the StructureMap. This indicates whether the StructureMap is active, draft, retired, etc. It helps users understand the lifecycle stage of the StructureMap.
      Possible Values: active, draft, retired, unknown
      Example: active
  4. General Description:
    • Description: A brief description or summary of the StructureMap. This provides an overview of the purpose and content of the StructureMap, helping users understand its context and usage.
      Example: This StructureMap is used for transforming patient health data from one format to another during data migration.

StructureMap Section

Below the Informations section, there is a large StructureMap area displaying the actual JSON code of the StructureMap. This code defines how data is transformed. The section includes a toolbar with icons for different actions:

  • Save: To save changes made to the StructureMap.
  • Refresh: To accept the new (unsaved) changes and access the Play button again.
  • Execute: To run the StructureMap transformation.
  • Reset: To reset the changes and return to the initial state.

For a detailed explanation of StructureMap functionalities and how mapping works, please visit the StructureMap documentation page.

Mapping Sections

Below the StructureMap section, there are three distinct areas labeled Sources, Targets, and Output. Each area is designed for different parts of the mapping process:

  1. Sources: This section is intended to display the source data that will be transformed. It includes a text area where users can input or view the source data in JSON format.

  2. Targets: This section is for defining the target structure to which the source data will be mapped. It also includes a text area for inputting or viewing the target JSON structure.

  3. Output: This section shows the result of the transformation after executing the StructureMap. It provides a text area where the output JSON can be viewed.

Each section (Sources, Targets, Output) has its own header with the section title and a toggle button to expand or collapse the section.

The mapping process

Here is how the transformation process works using StructureMap, following the steps Set the source, Refresh, and Execute:

1. Set the source

In this step, you need to provide the source data you want to transform. This is done in the Sources section:

  • Sources: You will see a text area where you can enter or paste the source data in JSON format. This data is what you want to transform into a new structure.

2. Refresh

This step involves refreshing the data to ensure it is correctly loaded and ready for transformation.

3. Execute

This step executes the transformation using the mapping defined by StructureMap.

  • Execute: After setting up the source data and the target structure, you need to click the execute button to start the transformation process.The transformation takes the source data and reorganizes it according to the target structure you have defined.

4. Output

Once the transformation is completed, the result will be displayed in the Output section:

  • Output: You will see a text area displaying the output JSON. This is the result of transforming your source data following the defined target structure.

Summary of steps:

  1. Set the source: Enter the source data in JSON format in the Sources section.
  2. Refresh: Ensure the source data and the target structure are well-defined and ready.
  3. Execute: Execute the transformation to get the result.
  4. Output: View the transformed JSON in the Output section.

Using Structure Maps and the Mapping Service

Structure Maps are at the heart of the data transformation process in the Janus application. With the Mapping Service, the application uses the Mapping Engine to convert data from various formats (XML, JSON, CSV, HL7v2) to standard formats such as FHIR® or CSV. This allows for easy integration of disparate sources and ensures data consistency within the application.

To learn more about how the Mapping Service works and the supported transformation operations, see the dedicated documentation.

Impact on the Interface and Features

The use of StructureMap and the Mapping Service translates concretely into the application:

  • The ability to view and execute transformations directly from the interface.
  • The display of conversion results in the "Output" section, facilitating data verification and validation.
  • A simplified user experience: simply enter the source data, define the target, then execute the transformation to obtain a result that meets the expected standards.

Example mapping workflow

This section illustrates a typical user workflow for transforming data using StructureMap in the Janus application.
To perform a mapping, follow these steps:

  • Enter your source data in the Sources tab. Paste or write your data in the provided text area.
Source Example
Figure 5: Example of source data entered in the Sources tab


  • Click the Transform button to execute the mapping transformation.
Transform Button
Figure 6: Click the Transform button to execute the mapping


  • View the result in the Output tab.
Output Example
Figure 7: Example of output data displayed in the Output tab


Example of StructureMap

Below is a simplified example of a StructureMap resource used for XML to FHIR mapping in the Janus application:

{
  "resourceType": "StructureMap",
  "id": "Test-XMLtoFHIR-StructureMap",
  "url": "https://fyrstain.com/StructureMap/Test-XMLtoFHIR-StructureMap",
  "version": "11",
  "name": "TestXMLtoFHIRStructureMapClone",
  "title": "StructureMap for XML to FHIR mapping",
  "status": "draft",
  "description": "StructureMap permettant la transformation d'un document XML vers le standard FHIR pour le POC Urgences",
  // Defines the source and target resource structures for the mapping
  "structure": [
    {
      "url": "https://fyrstain.com",
      "mode": "source"
    },
    {
      "url": "https://hl7.org/fhir/R4/ServiceRequest",
      "mode": "target",
      "alias": "target"
    }
  ],
  "group": [
    {
      "name": "main",
      // Defines the input resources for the mapping group: source and target
      "input": [
        // Source input: XML data to be transformed
        {
          "name": "source",
          "type": "XML",
          "mode": "source"
        },
        // Target input: FHIR Bundle to receive the transformed data
        {
          "name": "target",
          "type": "Bundle",
          "mode": "target"
        }
      ],
      // Transformation rules applied to map source data to target structure
      "rule": [
        // Rule: Maps the 'query' element from XML source to the 'type' field in the FHIR Bundle target
        {
          "name": "Query",
          "source": [
            // Source element: extracts 'query' from the XML input
            {
              "context": "source",
              "type": "XML",
              "element": "query",
              "variable": "query"
            }
          ],
          "target": [
            // Target element: sets the 'type' field in the Bundle to 'transaction'
            {
              "context": "target",
              "element": "type",
              "transform": "copy",
              "parameter": [
                {
                  "valueString": "transaction"
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}


Resource Validation and Integration with Test Platforms

The Janus application integrates resource validation directly into the mapping workflow via the Pandora test platform, allowing users to verify their data's compliance with official standards. This is possible thanks to dedicated validation buttons/icons, available in the Source, Target, and Output panels.

How Validation Works

  • For each resource displayed (source, target, output), a validation button (check mark icon) is displayed if a validator is available for that resource type.
  • When you click the validation button, the resource is sent to the test platform, which checks its format and compliance.
  • The validator used depends on the resource type (FHIR JSON, XML, CSV, HL7v2) and is configured via environment variables.

Validation Button Example

Validate Button Output
Figure 8: Validation Buttons for Output Resources


Supported Validators

The system supports multiple validators, each dedicated to a specific resource format. Validator IDs are defined via environment variables:

  • REACT_APP_VALIDATOR_FHIR_JSON_ID for FHIR JSON resources
  • REACT_APP_VALIDATOR_JSON_ID for generic JSON
  • REACT_APP_VALIDATOR_XML_ID for XML
  • REACT_APP_VALIDATOR_CSV_ID for CSV
  • REACT_APP_VALIDATOR_HL7V2_ID for HL7v2

If no validator is configured for a given resource type, the validation button will not appear.

How to Configure and Use Validation

  1. Configure Validators Define the appropriate environment variables in your deployment (see above) to link each resource type to its validation platform.

  2. Use the Validation Button

In the "Source", "Target", and "Output" panels, click the validation icon to validate the displayed resource.

  • If validation is available, you will see the validator result (success or error).
  • Otherwise, the icon will be hidden.

Example User Flow

  1. Enter your source data in the "Sources" tab.
  2. Click the validation button to check the source format.
  3. Transform your data and validate the target structure.
  4. When you click the validation button, a modal window appears to confirm the validation.
  5. After confirmation, you will be redirected to the external Pandora testing platform to view the detailed validation report for your resource.
Validation module
Figure 9: Modal window for confirming resource validation before sending to Pandora.


Pandora Validation Report
Figure 10: Example of a detailed validation report on the Pandora platform.


Automated Testing with TestableWidget component

Janus integrates the TestableWidget component to automate testing of StructureMap resources with the Pandora testing platform.

How it works

  • Artifact ↔ Test Script Relationship via Scope:

TestableWidget uses the "scope" parameter to filter and display only test scripts related to the currently edited StructureMap. This ensures that users see tests relevant to their specific mapping artifact. See the official FHIR specification for TestScript.scope and for TestPlan.Scope.

  • Fixtures as Encoded DocumentReference:

Test scripts use fixtures, which are FHIR "DocumentReference" resources containing base64-encoded test data. The fixture represents the newly edited and saved StructureMap.

  • Fixture Replacement:

When a user launches a test, TestableWidget replaces the fixture contents with the modified StructureMap directly in Janus. This is done by updating the DocumentReference directly before launching the test, without modifying the Pandora API $launchTest.

  • Workflow:
  1. The user modifies a StructureMap in Janus.
  2. The user saves the changes.
  3. The widget identifies the correct fixture and replaces it with the new StructureMap.
  4. The user clicks "Launch" a TestScript in the TestableWidget component.
  5. The test runs in AUTO MODE with the updated fixture.
  6. The user is redirected to the Pandora test report.
  • Configuration: TestableWidget is only displayed if the necessary environment variables are set. Otherwise, the test section is hidden.

Questionnaire Page

Welcome to the Questionnaire!

image
Figure 11: Questionnaire.


Search Criteria Section

At the top of the Questionnaire page, there is a Search Criteria section that allows users to filter and find specific Questionnaire entries. This section includes the following fields:

  • ID: A text input field where users can enter the unique identifier of the Questionnaire they are looking for.
  • Name: A text input field to search for Questionnaires by name.
  • Status: A dropdown menu to filter Questionnaires based on their status. Users can select a status from the list.

Below these fields, there are two buttons:

  • Search: A red button to initiate the search based on the entered criteria.
  • Reset: A dark gray button to clear the search fields and reset the criteria.

Questionnaire List

Below the search criteria section, there is a table listing all the Questionnaire entries that match the search criteria. This table includes the following columns:

  • ID: The unique identifier of the Questionnaire.
  • Name: A brief description of what the Questionnaire does.
  • Status: The current status of the Questionnaire (e.g., DRAFT).
  • Actions: Icons for editing and viewing the Questionnaire and to answer a Questionnaire. The pencil icon is for editing, and the play icon is for viewing or executing the Questionnaire. The check icon is for answering a Questionnaire via a form.

Pagination

At the bottom of the page, there is a pagination control that allows users to navigate through multiple pages of Questionnaire entries. Users can select the number of entries displayed per page using a dropdown menu (e.g., 10, 20, 50), and navigate between pages using the left and right arrow buttons or by selecting a specific page number.

Questionnaire Page Play

Welcome to the Questionnaire Page Launch!

image
Figure 12: Launch Questionnaire.


Informations Section

Directly below the header, there is an Informations section that provides details about the selected Questionnaire:

Detailed Information on Different Elements

Informations Section

Directly below the header, there is an Informations section that provides essential details about the selected Questionnaire. This section includes the following elements:

  1. ID:
    • Description: This is a unique identifier for the Questionnaire. It helps to distinguish this Questionnaire from others and is crucial for reference and retrieval.
    • Example: patient-health-questionnaire
  2. Name:
    • Description: The name of the Questionnaire. This is a human-readable string that provides a brief title or label for the Questionnaire.
    • Example: Patient Health Questionnaire
  3. Status:
    • Description: The current status of the Questionnaire. This indicates whether the Questionnaire is active, draft, retired, etc. It helps users understand the lifecycle stage of the Questionnaire.
    • Possible Values: active, draft, retired, unknown
  4. General Description:
    • Description: A brief description or summary of the Questionnaire. This provides an overview of the purpose and content of the Questionnaire, helping users understand its context and usage.
    • Example: This questionnaire is used for capturing patient health information during routine check-ups.

Questionnaire Section

Below the Informations section, there is a Questionnaire area displaying the actual JSON code of the Questionnaire. The section includes a toolbar with icons for different actions:

  • Save: To save changes made to the Questionnaire.
  • Refresh: To reload the Questionnaire.
  • Execute: To run the Questionnaire.

QuestionnaireResponse Sections

Next to the Questionnaire section, there are three distinct areas labeled QuestionnaireResponse and Output. Each area is designed for different parts of the QuestionnaireResponse extraction process:

  1. QuestionnaireResponse: This section is for defining the QuestionnaireResponse to which the data will be extracted.

  2. Output: This section shows the result of the extraction of the differente FHIR® ressource after executing the QuestionnaireResponse. It provides a text area where the output JSON can be viewed.

Each section has its own header with the section title and a toggle button to expand or collapse the section.

General Process Explanation

The overall process involves managing and executing a Questionnaire and extracting data into FHIR resources using the Structured Data Capture (SDC) approach. Below are the detailed steps and functionalities:

SDC Process

The Structured Data Capture (SDC) process involves creating, populating, and extracting data from questionnaires. Here's how it works:

  1. Creating a QuestionnaireResponse: Populate: This step involves creating an empty QuestionnaireResponse from the defined Questionnaire. The QuestionnaireResponse serves as a container for the answers to the questions defined in the Questionnaire.

  2. Answer Questions: Go through each question in the Questionnaire and provide the appropriate answers in the QuestionnaireResponse.The answers should be filled in the correct format, as specified by the question type (e.g., string, integer, date, choice, etc.).

  3. Executing the QuestionnaireResponse: After modifying the QuestionnaireResponse, you can use the Execute button in the QuestionnaireResponseand then you have to use the Refresh icon to reload the updated Questionnaire JSON and finally use the Execute button in the Questionnairesection to apply the changes and see the updated results in the Output section.

  4. Extracting Resources: Extract: After the step 3, this step involves extracting FHIR resources from the responses provided in the QuestionnaireResponse. Based on the answers, the system generates the corresponding FHIR resources (e.g., Patient, Observation, etc.) as defined by the mappings.

Reloading and Modifying Data

Regardless of which column you make changes to, you can reload the updated data into the corresponding section:

  • Reloading the Questionnaire: If you make modifications to the Questionnaire, you can use the Refresh icon to reload the updated Questionnaire JSON.

Validation of Output Resources

Once the extraction is done, the generated FHIR resources can be validated against specified profiles:

  • Validation: The extracted FHIR resources in the Output section can be validated against profiles specified in the metadata. This ensures that the generated resources conform to the expected standards and constraints.

How Validation Works

  • After answering the questionnaire and generating the output resource (e.g., CarePlan, Observation, etc.), the result is displayed in the Output panel.
  • If a validator is configured for the resource type (FHIR JSON), a validation button (check mark icon) appears in the Output panel.
  • Clicking the validation button sends the output resource to the Pandora test platform, which checks its format and compliance.
Validate Button Output
Figure 13: Validation Button for Output Resource


Supported Validators

The Pandora test platform supports multiple validators, each dedicated to a specific resource format. Validator IDs are defined via environment variables:

  • REACT_APP_VALIDATOR_FHIR_JSON_ID for FHIR JSON resources

For the Questionnaire workflow, only FHIR JSON validation is available, as the extracted resources are always in FHIR JSON format.

If no validator is configured for the output resource type, the validation button will not appear.

Example User Flow

  1. Complete the questionnaire and submit your answers.
  2. View the generated output resource in the Output panel.
  3. Click the validation button to validate the output JSON.
  4. When you click the validation button, a modal window appears to confirm the validation.
  5. After confirmation, you are redirected to the external Pandora testing platform to view the detailed validation report for your resource.
Validation Modal
Figure 14: Modal window for confirming resource validation before sending to Pandora.


Pandora Validation Report
Figure 15: Example of a detailed validation report on the Pandora platform.


Automated Testing with TestableWidget component

Janus also integrates the TestableWidget component to automate testing of Questionnaire resources and their extracted FHIR resources with the Pandora testing platform.

How it works

  • Artifact ↔ Test Script Relationship via Scope:

TestableWidget uses the "scope" parameter to filter and display only test scripts related to the currently edited Questionnaire. This ensures that users see tests relevant to their specific questionnaire artifact. See the official FHIR specification for TestScript.scope and for TestPlan.Scope.

  • Fixtures as Encoded DocumentReference:

Test scripts use fixtures, which are FHIR "DocumentReference" resources containing base64-encoded test data. The fixture represents the Questionnaire or the extracted FHIR resource (e.g., CarePlan, Observation) generated after completing a QuestionnaireResponse.

  • Fixture Replacement:

When a user launches a test, TestableWidget replaces the fixture contents with the modified Questionnaire or the extracted resource directly in Janus. This is done by updating the DocumentReference directly before launching the test, without modifying the Pandora API $launchTest.

  • Workflow:
  1. The user completes and saves a QuestionnaireResponse in Janus.
  2. The system extracts the relevant FHIR resource(s) (e.g., CarePlan, Observation).
  3. The widget identifies the correct fixture and replaces it with the extracted resource.
  4. The user clicks "Launch" a TestScript in the TestableWidget component.
  5. The test runs in AUTO MODE with the updated fixture.
  6. The user is redirected to the Pandora test report.
  • Configuration: TestableWidget is only displayed if the necessary environment variables are set. Otherwise, the test section is hidden.

Summary of Steps:

  1. Set up the Questionnaire: Define the Questionnaire in JSON format.
  2. Populate: Create an empty QuestionnaireResponse based on the Questionnaire.
  3. Answer Questions: Fill in the QuestionnaireResponse with answers.
  4. Refresh: Reload sections as needed after modifications.
  5. Execute: Run the QuestionnaireResponse to see the updated results.
  6. Extract Resources: Extract FHIR resources from the answers in the QuestionnaireResponse.
  7. Validate: Ensure the output resources meet specified profiles in the metadata.

By following these steps, you can efficiently manage, execute, and validate Questionnaires and their responses, ensuring compliance with FHIR standards.

QuestionnaireResponse Form Page

Welcome to the QuestionnaireResponse Form Page !

image
Figure 16: Questionnaire form.


Completing a Questionnaire and submitting an answer:

Here's how to access, complete and validate your form.

  1. Access to the form: Go to the questionnaire page via the corresponding URL or from the Questionnaire List. The form will be displayed automatically with the questions loaded.

  2. Fill in the form: Questions are displayed dynamically according to the questionnaire. If a field is mandatory, it must be filled in before submission.

  3. Submit Responses: Click on the ‘Submit’ button once you have completed the form.

    • If successful: A confirmation message is displayed. You will be redirected to the home page after a few seconds.
    • If unsuccessful: An error message is displayed. The response will not be saved.

By following these steps, you will be able to retrieve the form, complete it and then validate it.