AFG-Polio-Data / APMIS-Project

APMIS (Afghanistan Polio Management Information System) is an supplemental Immunization Activities management system to manage the vaccination activities in the country.
https://test.afghanistan-apmis.com
GNU General Public License v3.0
4 stars 7 forks source link

population import UI/feature refinements #653

Closed bnygren closed 1 week ago

bnygren commented 1 month ago

Importing updated population values for a campaign is not ideal.

  1. The population export from within the import popup lacks Dcodes and includes a bunch of inherited fields from SORMAS that aren't used in APMIS campaigns. Image

  2. With the transition to campaign-based population data the default population data file is unnecessary.

  3. There is also a "Download Import Template". This includes two rows of comment variables prefaced by ## which, if left in the import file, caused an error. Image

"Region" is incorrectly appearing as a header/variable in this file when in fact it is Province

region district campaign TOTAL_AGE_0_4 TOTAL_AGE_5_10 modality districtstatus
##Province District campaign TOTAL_AGE_0_4 TOTAL_AGE_5_10 modality districtstatus
##Code of Region Code of District UUID of Campaign Number Number Text Text

Proposed solutions:

  1. Update the campaign population export file to include the correct headers for APMIS, with Region, Rcode, Province, Pcode, District, Dcode, Campaign_ID, TOTAL_AGE_0_4, TOTAL_AGE_5_10, modality, and districtstatus. This exported file could be modified and used as an import file to update the campaign population. If there are no population/modality/status values for the campaign yet (e.g., the campaign is new, and not a duplicate), then the file would contain no population/modality/status values.
  2. Remove default population data export button.
  3. Import Template: Allow imports to ignore the ## commented rows. Drop Region column as it is not necessary. Include Dcode, Campaign_ID, TOTAL_AGE_0_4., TOTAL_AGE_5_10, modality and status, as these should be the fields that are actionable during import.

Notes about proposed import behavior.

The import fields the system should recognize are Pcode (added 23-May, per discussion), Dcode, Campaign_ID, TOTAL_AGE_0_4. TOTAL_AGE_5_10, modality, and districtstatus,) and should be handled as such during import:

PCode: (Integer)

Dcode: (integer)

Campaign_ID: (string)

TOTAL_AGE_0_4: (integer)

TOTAL_AGE_5_10 (integer)

modality: (string)

status: (string)

Partial imports:

bnygren commented 1 month ago

discussed 9 May dev meeting with Yahaya, will follow up with more info.

bnygren commented 3 weeks ago

Per 22-May discussion with @DevSeg we agreed that PCODE is required for import; DCODE column should be titled 'DCode' not 'district'. Export column order should match import. Thanks