Types of test status

This feature is available from V0.93-Bahmni

The Lab Technician should be able to select one of the preconfigured active test statuses from the drop-down and set an overall status for a “TEST” on the results entry page. 

Requirements:

The following requirements are implemented to complete this story.

  1. User logs into the Elis and clicks on the Administration tab to see an additional Item “Type Of Test Status” on the Left Menu.

    1. When client(s) wish not to use this feature will turn off the configuration using the use fields feature in the class AdministrativeFormFields

      



  1. Users click on the “Type Of Test Status” Menu on the Left Pane and should see the already configured type of test statuses.

  1. The page will not list any details if there are no test statuses configured yet.

  2. The pagination feature should be intact with other pages on Elis. That is, it lists 20 items at a time. 

  3. The list is ordered by “Test Status Name”

 

  1. Users click on the “Add” button on the “Type Of Test Status” menu page and lands on Add Type of Test Statust Status page

    1. As it is a new Test Status being created no id is displayed.

    2. Users should be able to select a status type from only the drop-down which is defaulted to “SAMPLE”.  And the currently available options for status type would be SAMPLE, TEST.

    3. Status types are preconfigured and in case a client needs additional status type, they should configure them as part of “AllowedTestStatusTypes”. Please note that the types here should be lower than Test Level. That said,  it could not be one of the Result, Analysis, Panel or Accession (etc) where we might have more than one Test for a given id.

    4. Status Name is a mandatory field and should be a UNIQUE String. The field accepts only 50 Characters. It can be a multi-word String separated by a space.

    5. The description is an optional field and should be a UNIQUE String. The field accepts only 200 characters.

    6. Active is a mandatory radio button field, having options to select for “Yes” or “No”. User is supposed to select the appropriate option and does not default to any option.

    7. Result Required is a mandatory radio button field, having options to select for “Yes” or “No”. The user is supposed to select the appropriate option and does not default to any option.

    8. Approval Required is a mandatory radio button field, having options to select for “Yes” or “No”. Users are supposed to select the appropriate option and do not default to any option. We can use this flag/feature in case we need to sync the test status data without approval on the Validation page. Please note this is out of scope for this Story.

    9. The Next and Previous options on the page are disabled.

    10. Exit should take the user back to the List page.

    11. Save performs the above-said validations and submits the form to the backend.

    12. The Business layer validates the record for Uniqueness of StatusName and Description. If the user enters a duplicate status Name or Description, the record is not created and the user is shown an error “An error occurred while updating.

    13. On successful submission of the form, a new record is created in the table “clinlims.type_of_test_status”. And the user still remains on/redirected to the same page where the test status ID is presented and he/she can further do any updates and resubmit. The “Next/ Previous” buttons are now enabled.



  1. Users click on the “Edit” button on the “Type Of Test Status” menu page and land on the Edit Type of Test Status page only when they select the type of status to be edited on the list page.

    1. The Type of Test status is non-null text on the edit screen.

    2. All the above said validations on the editable fields will be applied for submitting any modifications to the already created type of test status.

    3. On successful submission of the form, the data is updated on the clinlims.type_of_test_status table. And the user is taken to the Listing page.  



  1. Introduction of a new flag called flagForShowingTestStatus. 



This flag is added to the siteInformation table, where there is an option to set it true or false. In case, the flag is set to false - Type of Test Status drop down will not be shown to the customer. 

 

 



Results List View When the above said flag is OFF/False:



Result List View when the flag is ON/True:



  1. Users log into Elis, Click on samples collected Today to enter results. Will be shown 3 options (to enter results, to approve results, and to print) as part of the action section. When users opt to enter results, they will be taken to the result entry form.

    1. A new option “Test Status” appears as the first field to be selected by the user. It is defaulted to empty. 

    2. By default when there is no test status selected the result section comprising 4 fields as shown below (result, abnormal, referral reason, and organization) is as it is today.

 

  1. The Test Status drop down should list all the Active Only test statuses which are already configured per client needs.



  1. Users click on test status drop-down and select an option which is configured to not have a result (type_of_test_status.isResultRequired=N). 

    1. The result section should be greyed out/ disabled. Even on Tab click the user should not be able to enter results when the result required for the test status is set to N. Only option allowed is to upload any related files.

    2. A note section is enabled to allow users to enter additional notes on the status selected. This is optional and users should be able to submit the form through notes that are not entered.

    3. Users click the test status back to default option/empty, the result section will be enabled back.

  1. Users when submit the form selecting the test status, a test status should be mapped to the test in the table clinlims.test_status



  1. User wants to update the test status already saved clicks on the appropriate action  button and lands on the result entry page. On load the page should disable the result section when the type of test status already entered/saved has a result required set to 

“N”.



  1. The user enters a result and submits the form. And when realizes the result is wrongly entered and corrects the form by opting for test status. When submitting the form with test status, the already saved result should be deleted from DB (clinlims.result, clinlims.test_result). Notes are mandatory as the result is changed from non-null to a null value.





  1. User lands on the results entry page and when the test is referred out, selects appropriate options to mark the test as referred out. When the test is referred out, the result section is disabled currently, and so should be the test status field.

  1. User lands on the results entry page and on load the test status field remains disabled when the test is marked as referred out.

  1. On the result entry page, users click on the test status drop-down and select an option that is configured to allow the result (type_of_test_status.isResultRequired=Y). 

    1. The result section should NOT be grayed out/ disabled.  

    2. A note section is enabled to allow users to enter additional notes on the status selected. This is optional and users should be able to submit the form through notes are not entered.

    3.  Users should be allowed to enter results along with Test status, this is mostly for the success/partially successful tests

 

 

 

Out Of Scope:

  1. Test Status Sync back to openMRS is out of scope for this story.



Assumptions with Community Approval:

  1. Test Status does not need to be present on the Validation page.  If the client needs information to be shown on the validation/approval page it should be a non-editable text.

  2. In case a technician wants to edit the status, they should reject the test and re-enter the correct status on the results entry page.



The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)