The "Diagnosis Verification Procedure" process:
The diagnosis verification procedure is performed by the Regional Healthcare Administration (RHA) that verifies the assistance cases produced by Hospitals in that region in order to check their validity and to calculate the reimbursements for these hospitals. To check the cases validity RHA chooses randomly a set of them. Each case describes a treatment done by the hospital to a patient. It is composed by the documents related to the electronic health records (EHR) and a set of diagnosis that has been identified by doctors for the patients relatively to their treatments done in that hospital. The RHA receives the EHRs and the diagnosis for each of the patient that has been assisted in the hospitals in order to calculate the amount of money that need to be paid to the hospitals for their services and expenses.
The set of selected cases is verified by a set of automatic verification procedures to check if each diagnosis that has been specified by the doctors is consistent with the EHR content. If a doctor specified some diagnosis that are not coherent with the information that is contained in the EHR, then this case is marked as “rejected”. In addition, a set of codes that explain the reason of rejection is provided.
The “rejected” cases and the rejection codes (stored in a CSV file) are then sent back to the Hospital to be verified by the hospital administration. The Hospital administration officer then needs to open each of the rejected cases and manually check if the specified codes can be solved by her, or there is the need to involve the responsible doctors (the one that assisted that citizen) and ask them to fix the issue. This choice is made checking the reason (expressed by codes) of rejection and in particular if they are related the syntax of the diagnosis or they are related to the correspondence between the EHR and diagnosis.
For each of the codes, the officer (or the responsible doctor) needs to prepare a textual response and, if necessary, to modify the set of diagnosis or the EHR of that patient.
Once finished checking all rejected cases, they are sent together with the responses to the RHA. RHA then does another check to each of the cases and if there are other errors, the case is sent back again to the hospital.
The approved cases are then evaluated and based on the diagnosis, an amount is calculated and paid to the hospitals for the service they provided to the citizens. The paying procedure is done 2 times per year at each 6 months (on the 15th of January and 15th of July).
extension n.1 on the above process:
The reports about the number of rejected cases, the multiple times rejected ones, the paid amounts, the statistics about diagnosis by each hospital are sent in at each payment period (15 January and 15 July) to the Ministry of Health. At each 1st February the Ministry produces a statistical report analyzing the global National healthcare system. The report is sent also to the hospitals.
extension n.2: model the case in which at the second rejection a 50% of payment is subtracted and won't be paid to the hospital.
extension n.3: do you think it is possible (if not, say why) to use event-based gateway in the process? If yes say where and why they could be used?
Implementation (20 points) 1) You don't need to use the activiti-explorer, just complete the tasks from the Eclipse editor. Modify the configuration file according to the exercise needs. 2) Create a project called Exam2_YourID_Name_Surname (eg. Exam2_144244_John_Doe) and a diagram. Use pools and lanes. 3) Some SQL statements that you will need maybe: 1. SQL INSERT statement have the following structure: INSERT INTO table_name VALUES (value1,value2,value3,...); 2. SQL UPDATE statement have the following structure: UPDATE table_name SET column1=value, column2=value2,... WHERE some_column=some_value For more info take a look here: http://www.w3schools.com/sql/ 4) The process implements the “Diagnosis Verification Procedure” explained in the first part of the exam. The Hospital and the RHA are two actors using the same system that is the one you are going to model and build. The whole process should be as follows: 1. The Hospital generates the cases one by one while assisting people. These cases are saved on the DB on a table called DIAGNOSIS and having the following fields: a. CASE_ID INT PRIMARY KEY b. PATIENT_ID VARCHAR c. DIAGNOSIS_CODE VARCHAR d. IS_SENT BOOLEAN e. IS_APPROVED BOOLEAN f. MOTIVATION INT 2. At the beginning of each month the reports are sent to the RHA. The sending is done by marking the “IS_SENT” field to TRUE. a. NOTE: if you don’t know hot to implement the sending procedure at each 1st of the month then use 30 days as the value. 3. The RHA checking process starts by selecting randomly 5% of cases. Let imagine that the CASE_ID start from 0 to N, where N is the number of cases. Implement the random picking of cases of the 5% of cases that need to be checked. Store the loaded cases into an Array of integers. You could use the following pseudo-code: int cases[]; //to create the array // sql to load the cases // instantiate cases with the resultSet length Math.rand(cases.length) //to pick randomly a n between 0 and N 4. Randomly pick 10% of the checked cases and mark them as “rejected” by setting the IS_APPROVED to FALSE and putting as MOTIVATION a randomly picked code from 0 to 1000. Otherwise put IS_APPROVED to TRUE. 5. Once finished checking all the 5% of cases that have been randomly picked, notify the hospital administration office by sending an email to “adminoffice@hospital.it”. Include in the email the number of cases that has been rejected. 6. Simulate the verification of rejected cases by the Hospital inside a subproces. The Hospital has 30 days to perform the checking procedure. Then it needs to be interrupted. Notify the “administrator@hospital.it” 5 days before the 30 days period expires. 7. The verification starts by loading all the rejected cases from the database and grouping them by CASE_ID. You don’t need to do sql queries. Let imagine you receive from this loading procedure an Array of Objects called “Cases”. Where Cases is defined as follows: public class Cases { int case_id; int motivations[]; public getMotivations{ return motivations; } } 8. For each of the case we will have one or more verification tasks that need to be done. The verifications correspond to the array of motivations. The admin office should be able to execute them in parallel. Implement carefully this automatic generation of tasks depending of the number of verifications that need to be done for the same case_id. 9. Each verification is a human task that shows the motivation to the user that need to analyzed. The task has the field RESPONSE of type String. 10. Once replied to all verifications for a case start with another. 11. The process ends when all cases are verified. Good luck