BlueCodeSystems / opensrp-client-ecap-chw

This is the ECAP-II Client repo based on openSRP-chw Client
Other
1 stars 0 forks source link

Case plan: display type of case plan and sort case plans by most recent. Most recent should be on top. #456

Open tobiasmakai opened 2 years ago

tobiasmakai commented 2 years ago

Screenshot_20220107-233005_Ecap II HIV displayed should be HIV Management

chobela commented 2 years ago

@tobiasmakai this can only be sorted by date in descending order. So if we have three plans on the same date, they may not be in order

tobiasmakai commented 2 years ago

@chobela What do you mean descending? The most recently added should be on top even if the case plans have been updated on the same day. Although practically there wont be multiple case plans added on the same day for the same VCA or Caregiver unless what is going on is back data entry.

chobela commented 2 years ago

@tobiasmakai By Descending, I mean the most recent input will be on top. What I mean is say, someone enters "SCHOOLED" on 1st January, next they enter "HEALTHY" entered on 2nd January, and finally, "SAFE" also entered on 2nd January. There may not be an order when the 3 entries are listed because they all occured on 2nd January.

We will only see an order if, for example they now entered "SAFE" on 3rd January, SAFE will appear first on the list. then those that will appear next will be those entered on 2nd January. Though those entered on 2nd January may not be in order of their entry on 2nd January.

tobiasmakai commented 2 years ago

The domain to Case plan relationship should not be 1 to 1. A single case plan can have multiple vulnerabilities. A vulnerability falls under a domain. Multiple vulnerabilities can belong to one domain.