Feature #1655
When a case changes it Owner unit id
0%
Description
A case can have its owner_unit_id changes in some situations:
- When starts treatment on a health unit different than the notification unit.
- When it is transferred
- When its notification unit changes
If it happens to a Desktop synchronized unit this case must be deleted from the desktop database.
I tryed to do it at the end of the sync, but it was not possible. The web system sends only cases modified that are from the sync unit, so if a case had its owner_unit_id changed it will not be updated on the Desktop and the desktop doens't have how to know what happened for this case.
Discuss with Ricardo.
History
#1
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from High to Low
#2
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from Low to Normal
#3
Updated by Maurício Dos Santos over 9 years ago
- Status changed from New to Feedback
- Assignee changed from Ricardo Memoria to Maurício Dos Santos
#4
Updated by Maurício Dos Santos over 9 years ago
Another obs:
When I changed the notification unit of a case that was not on treatment its owner unit (the internal field) was not changed, so this case was still a case from the first notification unit. Need to review this rule with Ricardo, and if needs, correct it. So, if a case has this internal field (owner_unit_id) wrong filled in, this case will go to the wrong desktop instance.
#5
Updated by Maurício Dos Santos over 9 years ago
Another one obs:
When it changes the owner unit for a case on the web, including this case on a Desktop unit, not all information about this case is sent to the desktop, specially the information that goes out of the case tag inside the xml file, probably because of the transaction id of these other entities that doesn't change when the owner id changes for the tbcase entity.
#6
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from Normal to Urgent
#7
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from Urgent to Immediate
#8
Updated by Maurício Dos Santos over 9 years ago
verificar se a owner unit esta sendo corretamente alimentada, no caso de um caso que nao esta em tto esta deve ser igual ao notification, se for um caso em tto tem que ser igual ao da ultima health unit.
Criar uma classe para fazer a seguinte lógica de tro do owner id:
- Colcoar no deleted entity quando o owner mudar
- zerar o client id.
- verificar todas as listas do caso, e as listas que tiverem objeto atualizar o last transaction id de todos esses objeto.
#9
Updated by Maurício Dos Santos over 9 years ago
- Status changed from Feedback to In Progress
#10
Updated by Maurício Dos Santos over 9 years ago
- Status changed from In Progress to Feedback
95% implemented
Need to:
Check with Ricardo why the owner Id is being set on ExamRequestController... Depending on why maybe the rule that selects the owner unit have to be changed!
Test all methods that is using OwnerUnitChecker
Test again if the process of removing a case from a unit and sending to another is working, also if the related entities are being sent to the new unit.
#11
Updated by Maurício Dos Santos over 9 years ago
- Status changed from Feedback to In Progress
Apply the rule on that class too
#12
Updated by Maurício Dos Santos over 9 years ago
done
#13
Updated by Maurício Dos Santos over 9 years ago
Done, need testing and commit.
#14
Updated by Maurício Dos Santos over 9 years ago
- Status changed from In Progress to Resolved