Bug #1670
When Sync doesn't end with success
0%
Description
If, for any reason (bad connection for example) the sync don't finish with success, when trying to sync again, all new entities (cases, exams, additional information) is duplicated, also if the second (third, fourth...) sync trial is not succeed.
Technical information:
It happens because after receiving the file the web system load all information to the database, but the desktop side will only stop sending this "new" entities when in the fourth step its status is changed to synchronized, so, if, for any reason, the sync don't reach the fourth step the desktop will continue sending those new entities.
Need Ricardo's opinion.
History
#1
Updated by Maurício Dos Santos over 9 years ago
- Status changed from Feedback to New
No método createNewObject do ladodo web, quando for um objeto novo, verificar se existe algum objeto no banco de dados com o mesmo clientId e owner unit id. Se sim, pegar esse objeto do banco e retorna-lo.
#2
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from High to Immediate
#3
Updated by Maurício Dos Santos over 9 years ago
- Status changed from New to In Progress
#4
Updated by Maurício Dos Santos over 9 years ago
- Status changed from In Progress to Feedback
clientId is a @transient parameter, no way to implement the solution above without having this parameter on the web database, check with Ricardo.
#5
Updated by Maurício Dos Santos over 9 years ago
So we will test it on another way:
- Improve SyncClear Annotation, changing it propose to annotate details about sync.
- Implement parameters on that annotation to verify what the sync should do about it, like, clear = true, keyparameter = true...
- While synchronizing, it it is a new entity (serverId is null) check if there is any other entity with the same key parameters, for example, for a tbcase it should be registration date. For patient, should be the name, mothername and birthdate. If exists any other entity with thiose key parameter equals the ones of the new entity coming from sync the system should merge those objects.
#6
Updated by Maurício Dos Santos over 9 years ago
- Status changed from Feedback to New
#7
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from Immediate to High
#8
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from High to Urgent
#9
Updated by Maurício Dos Santos over 9 years ago
- Status changed from New to In Progress
#10
Updated by Maurício Dos Santos over 9 years ago
Case side effect nao foi feito o controle, pq no generico seriam utilizados o mes, tbcase e o sideeffect, mas em bangla seria utilizado o sideeffect, tbcase e a data inicial.
Solução: popular o mês automaticamente e usar em bangla mês, data inicial e case.
#11
Updated by Maurício Dos Santos over 9 years ago
Check bellow the attrbutes being used on the search of similar entities
TbCase - patient e registration date
Exam culture, microscopy, xpert, dst, skin, biopsy - date collected, laboratory, tbcase
Medical examinarion, exam hiv, exam xray - data, tbcase.
Casesideeffect - pending - mês, tbcase, sideeffect, and initial date for bangladesh
tbcontact - tbcase, name, gender, age
Commorbiditie - no need, diferent way of importing.
Patient - need to check!
#12
Updated by Maurício Dos Santos over 9 years ago
updating:
TbCase - patient e registration date
Exam culture, microscopy, xpert, dst, skin, biopsy - date collected, laboratory, tbcase
Medical examinarion, exam hiv, exam xray - data, tbcase.
Casesideeffect - pending - mês, tbcase, sideeffect, and initial date for bangladesh
tbcontact - tbcase, name, gender, age, typeof contact
Commorbiditie - no need, diferent way of importing.
Patient - pending
#13
Updated by Maurício Dos Santos over 9 years ago
tbcase and patient verification need to be improved and tested
casesideeffect need to be reinvented because of the explained above.
#14
Updated by Maurício Dos Santos over 9 years ago
tbcase and patient verification need to be improved and tested - STILL PENDING
casesideeffect need to be reinvented because of the explained above. - DONE
#15
Updated by Maurício Dos Santos over 9 years ago
- Status changed from In Progress to Feedback
#16
Updated by Maurício Dos Santos over 9 years ago
A verificação do tbcase e patient sera feita no mesmo momento. Atributos que seão analisados:
-owner_id
-diagtype
-notifid
-regdate
-patient ref by
-name
-age
-gender
Está pronto, verificar aval do ricardo:
- O problema é que em bangl muitas pessoas tem o mesmo nome, sera que os atributos acima são o suficiente?
- Quando cadastra um caso é criado tb um medicalexamination, porem, como o caso ainda nao tem case_id no lado do servidor, fica dificil determinar qual o caso desse medicalexamination(nao existe tbcase.id no params do medical examination) que esta sendo criado, pq nao vem na lista de parametros! Isso tb pode acabar acontecendo com casos novos que já possuem exames cadastrados mas nunca foram sincronizados.
#17
Updated by Maurício Dos Santos over 9 years ago
- Priority changed from Urgent to Immediate
#18
Updated by Maurício Dos Santos over 9 years ago
- Status changed from Feedback to Resolved
Ricarod aprovou os campos selecionados para verificar a duplicidade tbcase e patient.
O problema relatado foi resolvido.