Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Step No.

Step Description

Expected Results

Users and Roles setup
(setting up 3 users with different roles for data export)

  1. Non-anonymised Export

  2. Anonymised Export

  3. Non Exporter

Login to OpenMRS with below credentials
Application URL - https://qa.snomed.mybahmni.in/openmrs
username - superman
password - Admin123

User should be logged in

Navigate to Settings under Administration Tab

Non-Anonymised

  1. Under Manage Roles, add a new role named "nonanonymised"

  2. Select Clinical-App, Admin-App, and Bahmni-App from the Inherited role section

  3. Set previleges as "Export Non Anonymised Patient Data" and "Export Patient Data" and save

  4. Under Manage Users, create a user named "Plainexporter"

  5. Assign the role "nonanonymised" that was created

  6. Set username and password as plainexporter and Admin123 respectively and Save

System should save the role with the assigned privileges and create the user and assign the role to the user

Anonymised

  1. Under Manage Roles, add a new role named "anonymised"

  2. Select Clinical-App, Admin-App, and Bahmni-App from the Inherited role section

  3. Set previleges as "Export Patient Data" and save

  4. Under Manage Users, create a user named "Defaultexporter"

  5. Assign the role "anonymised" that was created

  6. Set username and password as default and Admin123 respectively and Save

System should save the role with the assigned privileges and create the user and assign the role to the user

Non Export

  1. Under Manage Roles, add a new role named "noexport"

  2. Select Clinical-App, Admin-App, and Bahmni-App from the Inherited role section and save

  3. Under Manage Users, create a user named "nonexporter"

  4. Assign the role "noexport" that was created

  5. Set username and password as nonexport and Admin123 respectively and Save

System should save the role with the assigned privileges and create the user and assign the role to the user

Configuration Setup

Login to OpenMRS with below credentials
Application URL - https://qa.snomed.mybahmni.in/openmrs
username - superman
password - Admin123

User should be logged in

Navigate to Settings under Administration Tab

Under Settings, navigate to FHIR Link

System should display the global properties on the right hand side

Value of "Export Files Directory" should be set to /openmrs/data/fhirExports

Set value of 'Export Anonymise Config Path' as /openmrs/data/fhir-export-anonymise-correlate-config.json

This configuration determines which attributes of the resources will be exported, redacted, randomized, etc

Click on Save button

System should save the configuration

Non-Anonymised FHIR Export of Patient Data

Login to bahmni Bahmni application as user
Application URL - https://qa.snomed.mybahmni.in

Provide the below credentials
Username: plainexporter
Password: Admin123

User should be logged in

Goto the Admin module and click on FHIR Export

System should display FHIR Export page, table is loaded by default for privileged users

The Start Date and End Date should be provided by default (End Date = Current Date, Start Date = 30 days prior)

The 'Anonymise' check box should be selected by default and is editable

Scenario 1: User does not provide start date and end date and 'Anonymise' check box is unchecked, and then clicks on Export button

System should display success message in the toast "Request submitted. Please click on 'Refresh' to check status of report

Click on the Refresh button to reload the table

An entry is created in a table with the below columns:
Export triggered date, start date, end date, user name, Anonymised, status, and download link

The status column in the table can have 3 values: Accepted, Completed, Rejected

Status column displays accepted

Download column should be blank, as the system is still processing the export

Status column displays rejected

Download column should be blank, as the system could not process the request. User should contact administrator for support

Status column displays completed

Download link should be displayed in the download column

Click on Download link in the 'download' column

A zip file containing clinical and personal data of all the patients in Bahmni should get downloaded in the selected location (since no start date and end date is provided, system exports all the data)

Navigate to the location where the file is downloaded and unzip the file

Zip file should contain all, any, or none of the following NDJSON resources. The data should contain non-anonymised information, including personal identifiable information
Patient - Contains patient details for all the patients
Condition - Contains all the conditions corresponding to the patients
Medication - Contains all the medications corresponding to the patients
ServiceRequest - Contains all the procedure orders corresponding to the patients

Patient attributes NJDSON - resourceType, identifier, active, name, gender, birthDate, deceasedBoolean, deceasedDateTime, address

Condition Attributes NDJSON - resourceType, clinicalStatus, category, code, subject, encounter, onsetDateTime, recordedDate, recorder

Medication Attribute NDJSON - resourceType, status, intent, priority, medication, subject, encounter, authoredOn, requester, dosageInstruction, dispenseRequest.validityPeriod, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.quantity

ServiceRequest Attribute NDJSON - resourceType, status, category, code, subject, encounter

Scenario 2: User provides start date and end date and 'Anonymise' check box is not selected and clicks on Export

System should display success message in the toast "Request submitted. Please click on 'Refresh' to check status of report

Click on the Refresh button to reload the table

An entry is created in a table with the below columns:
Export triggered date, start date, end date, user name, Anonymised, status, and download link

Status column displays accepted

Download column should be blank, as the system is still processing the export

Status column displays rejected

Download column should be blank, as the system could not process the request. User should contact administrator for support

Status column displays completed

Download link should be displayed in the download column

Click on Download link in the 'download' column

A zip file containing clinical and/or personal data of the patients in Bahmni modified during the dates provided should get downloaded in the selected location

Zip file should contain all, any, or none of the following NDJSON resources. The data should contain non-anonymised information, including personal identifiable information
Patient - Contains patient details for all the patients
Condition - Contains all the conditions corresponding to the patients
Medication - Contains all the medications corresponding to the patients
ServiceRequest - Contains all the procedure orders corresponding to the patients

Patient attributes NJDSON - resourceType, identifier, active, name, gender, birthDate, deceasedBoolean, deceasedDateTime, address

Condition Attributes NDJSON - resourceType, clinicalStatus, category, code, subject, encounter, onsetDateTime, recordedDate, recorder

Medication Attribute NDJSON - resourceType, status, intent, priority, medication, subject, encounter, authoredOn, requester, dosageInstruction, dispenseRequest.validityPeriod, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.quantity

ServiceRequest Attribute NDJSON - resourceType, status, category, code, subject, encounter

Provide start date > end date and click on 'Send' button

System should display error message "End date [yyyy-mm-dd] should be on or after start date [yyyy-mm-dd]"

Anonymised Bulk FHIR Export

Login to Bahmni application as user with below credentials
Application URL - https://qa.snomed.mybahmni.in
Username: default
Password: Admin123

User should be logged in

Goto the Admin module and click on FHIR Export

System should display FHIR Export page. Table is loaded by default for privileged users

The Start Date and End Date should be provided by default (End Date = Current Date, Start Date = 30 days prior)

The 'Anonymise' check box should be selected by default and should be non-editable

Click on the 'Export' button

System should display success message in the toast "Request submitted. Please click on 'Refresh' to check status of report

Click on the Refresh button to reload the table

An entry is created in a table with the below columns:
Export triggered date, start date, end date, user name, Anonymised, status, and download link

Status column displays accepted

Download column should be blank, as the system is still processing the export

Status column displays rejected

Download column should be blank, as the system could not process the request. User should contact administrator for support

Status column displays completed

Download link should be displayed in the download column

Click on Download link in the 'download' column

A zip file containing clinical and/or personal data of the patients in Bahmni modified during the dates provided should get downloaded in the selected location

Navigate to the location where the file is downloaded and unzip the file

Zip file should contain all, any, or none of the following NDJSON resources. The data should be anonymised, meaning, no personal identifiable information should be exported
Patient - Contains patient details
Condition - Contains all the conditions corresponding to the patients
Medication - Contains all the medications corresponding to the patients
ServiceRequest - Contains all the procedure orders corresponding to the patients

Patient attributes NJDSON - resourceType, active, gender, birthDate (set to 1st January of the birth year), deceasedBoolean, deceasedDateTime (set to 1st January of the death year)

Condition Attributes NDJSON - resourceType, clinicalStatus, category, code, subject (an obfuscated handle to correlate to patient), onsetDateTime

Medication Attribute NDJSON - resourceType, status, intent, medication, subject (an obfuscated handle to correlate to patient), dispenseRequest.validityPeriod, dispenseRequest.numberOfRepeatsAllowed, dispenseRequest.quantity

ServiceRequest Attribute NDJSON - resourceType, status, category, code, subject (an obfuscated handle to correlate to patient)

Authorization error when exporting Non-Anonymised Data

Login to Bahmni application as user
Application URL - https://qa.snomed.mybahmni.in

User should be logged in

Under Authorization, provide the below credentials
Username: nonexport
Password: Admin123

Goto the Admin module and click on FHIR Export

System should display FHIR Export page

On the FHIR export page system should display a note "You do not have sufficient privilege to export data"

User should not be able to take any action on the page. i.e., all the buttons are disabled, also table is not loaded for non-privileged users

Audit Log

After the export of patient data, user navigates to Audit Log page

System displays the audit log page with the entries

System should display an entry for the bulk fhir export with the following message:
User <username> performed a bulk patient data export for: Start Date <date> at <hh:mm:ss> and End Date <date> at <hh:mm:ss> in <Anonymized/Non Anonymised> mode

The other columns in the audit log should be:
Created At, Event tyepe, username, patient ID, message, module

Viewing previously downloaded resources

Goto the Admin module and click on FHIR Export

System should display FHIR Export page

System should display the list of previously triggered exports in the same table which is mentioned in above scenarios

System should display the date and time of the export trigger along with the start date (if provided), end date (if provided), anonymised?, user, status, and the download column

System should allow the users to download the previously exported files upon clicking the download link

The previous download links will download the same file as it was used to download, when the link was most recent

Anonymised Bulk FHIR Export - Random Value

Login to OpenMRS
Application URL - https://qa.snomed.mybahmni.in/openmrs

User should be logged in

Navigate to Settings under Administration Tab

Under Settings, navigate to FHIR Link

System should display the global properties on the right hand side

Value of "Export Anonymise Config Path" should be set to /openmrs/data/fhir-export-anonymise-random-config.json

System should save the configuration

Export patient data using FHIR Export module

The Patient JNDSON should display the Address and Contact attributes as random characters

All other attributes remain the same in Patient resource and in other resources

Anonymised Bulk FHIR Export - Fixed Value

Login to OpenMRS
Application URL - https://qa.snomed.mybahmni.in/openmrs

User should be logged in

Navigate to Settings under Administration Tab

Under Settings, navigate to FHIR Link

System should display the global properties on the right hand side

Value of "Export Anonymise Config Path" should be set to /openmrs/data/fhir-export-anonymise-fixed-config.json

System should save the configuration

Export patient data using FHIR Export module

The Patient JNDSON should display the Address and Contact attributes as "fixedvalue"

All other attributes remain the same in Patient resource and other resources

Anonymised Bulk FHIR Export - Redact

Login to OpenMRS
Application URL - https://qa.snomed.mybahmni.in/openmrs

User should be logged in

Navigate to Settings under Administration Tab

Under Settings, navigate to FHIR Link

System should display the global properties on the right hand side

Value of "Export Anonymise Config Path" should be set to /openmrs/data/fhir-export-anonymise-config.json

System should save the configuration

Export patient data using FHIR Export module

The export happens with personal identifiable information of the patient removed from all the resources (Patient, condition, medication request, and service request)

All other attributes remain the same in all the resources