Hi, everyone.
In module one of my application, I have formulario de registo (registration form) where I register patients as either apoio ou reforco a adesão: apoio ou reforco a adesão are types of patients. When updating the registration in actualizar registo (update registration), a patient registered as apoio can after some time change to reforco a adesão and vice-versa.
In module II, I follow up with patients registered as apoio in the form: visita de apoio - A patient registered as apoio receives 2nd visit 60 days after first visit.
Here I have a hidden value that calculate the number of days for the second visit:
Apoio: Data da proxima visita (next_visit_date_apoio):
if(format-date(date(today() + 60), “%a”) = “Sun” or format-date(date(today() + 60), “%a”) = “Sat”, date(today() + 62), date(today() + 62))
Patients registered as reforco a adesão are followed up in the form: reforco a adesão - they receive a 2nd visit 37 days after first visit.
Here I have another hidden value that calculate the number of days for the second visit
Reforco a adesao: Data da proxima visita(next_visit_date_adesao):
if(format-date(date(today () + 37), “%a”) = “Sun” or format-date(date(today() + 37), “%a”) = “Sat”, date(today() + 37), date(today() + 39))
I have another hidden value: proxima_visita
proxima_visita = cond(tipo_de caso="apoio",next_visit_date_apoio, tipo_de_caso="next_visit_date_adesao", "") which is in the case list.
In the image below I have registered Agira Chitsipa first as apoio (formulario de rgisto) and it shows that the 2nd visit will be after 37 days which is ok, but when Agira Chitsipa changes to reforco a adesao in actualizar formulario, it still shows 37 days but it should change to 60 days.
Iam looking for ideas and any suggestions on how I can configure this are welcome.
Thanks in advance