EyeSeeTea / malariapp

Android app to help with health center assessments (development repository)
GNU General Public License v3.0
6 stars 3 forks source link

New multilevel hide/show logic using UIDs for DE/Options, replacing the simple parent/child relation #1158

Closed adrianq closed 8 years ago

adrianq commented 8 years ago

@idelcano Requirements for this task have change (they are a little bit more complex now). In a nutshell, for a child question server config will be: Question -> benitoUid Parent Question -> pepeUid, joseUid Parent Option -> pepeOption1Uid,pepeOption2Uid;joseOption1Uid,joseOption2Uid

Will further explain tomorrow anyway. Nothing to worry about for the moment

adrianq commented 8 years ago

Another example: Parent: Enfermedades -> Malaria | Tuberculosis | Diarrea Parent2: Donde estuve de viaje -> Canarias | Asturias | Teruel

Child: Tiene Fiebre -> Si | No

Child Parent Question -> enfermedadesUid, viajeUid Parent Option -> malariaUid, tuberculosisUid;canariasUid,asturiasUid

idelcano commented 8 years ago

I used the program: iwiOQoq5Pl8 ICM and the server hnqis-dev-ci.psi-mis.org I added two new attributes: https://hnqis-dev-ci.psi-mis.org/api/attributes/o6Qs33s2dSG code="DEQuestionParents" https://hnqis-dev-ci.psi-mis.org/api/attributes/P7JrYb1ALTT code="DEQuestionParentOptions"

I tested this feature in hnqis-dev-ci with the follow dataelemens: Child https://hnqis-dev-ci.psi-mis.org/api/dataElements/jSlshy864LD Parents: https://hnqis-dev-ci.psi-mis.org/api/attributes/o6Qs33s2dSG code="DEQuestionParents"

qmGnowBqwuz,wl65ofYk8Aj

Options: https://hnqis-dev-ci.psi-mis.org/api/attributes/P7JrYb1ALTT code="DEQuestionParentOptions"

kkOywHQwQWE;yVUHqeMvBJZ

Child: https://hnqis-dev-ci.psi-mis.org/api/dataElements/wl65ofYk8Aj

Parents: https://hnqis-dev-ci.psi-mis.org/api/attributes/o6Qs33s2dSG code="DEQuestionParents"

pdHFr9t9hnI

Options: https://hnqis-dev-ci.psi-mis.org/api/attributes/P7JrYb1ALTT code="DEQuestionParentOptions"

yVUHqeMvBJZ

Child: https://hnqis-dev-ci.psi-mis.org/api/dataElements/iwiOQoq5Pl8

Parents: https://hnqis-dev-ci.psi-mis.org/api/attributes/o6Qs33s2dSG code="DEQuestionParents"

yYU9SYUFuHy

Options: https://hnqis-dev-ci.psi-mis.org/api/attributes/P7JrYb1ALTT code="DEQuestionParentOptions"

kkOywHQwQWE,yVUHqeMvBJZ

More info in the PR

ifoche commented 8 years ago

thanks @idelcano

ifoche commented 8 years ago

I've built on Family Planning Program the following scenario: Options: Yes: kkOywHQwQWE No: yVUHqeMvBJZ

Questions:

Great GrandPa (wpFMAduOiaK) "Counsel-Does this facility offer contraceptive counseling?" --on Yes

GrahdPa (lZgXZ5fzaDz) "Counsel-Mentions all FP methods" --> On Yes or No Father (NZQ5uHE7sLL) "Counsel-Mentions RTI.STI/HIV, and CaCx services offered in the FP clinic or through referral" --> On No Child (CUTLiAKPjBJ) "Counsel-Provider rules out pregnancy using MEC check list and if indicated performs a pregnancy test" --> On Yes Grandson (xSD9KPhNcAi) "Counsel-Appropriately ensures informed choice while counseling"

GrandPa (qJsLHfU8C8X) "Counsel-Helps the client to choose the method that is most convenient for her/him" --> On Yes Father (vRmNs9hNCsa) "Counsel-Counsels appropriately on the method chosen" --> On Yes Child (rP8xzKKqH4W) "Counsel-Client signs a consent form before receiving an FP method" --> On Yes Grandson (xSD9KPhNcAi) "Counsel-Appropriately ensures informed choice while counseling"