medic / cht-user-management

GNU Affero General Public License v3.0
3 stars 1 forks source link

Update Uganda configuration to match VHT creation template #39

Closed kennsippell closed 7 months ago

kennsippell commented 8 months ago

https://docs.google.com/spreadsheets/d/1g58uE5xMxFftaRIgazqk7nC1nOSGIUayQmbL-Xs4rzY/edit#gid=0

kennsippell commented 8 months ago

@jonathanbataire @KicaRonaldOkello @tjovia

kennsippell commented 8 months ago

@jonathanbataire @tjovia Here is where we are at today:

image image

Resulting Place

{
  "_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
  "_rev": "2-aeead55a9842ea04f799af1b439cce04",
  "name": "Jonathan Bataire Area (village)",
  "district": "Dist",
  "sub_district": "Subd",
  "county": "Count",
  "sub_county": "Subc",
  "parish": "Par",
  "village": "Vill",
  "type": "contact",
  "contact_type": "health_center",
  "parent": {
    "_id": "d44ba06d-4788-4576-b2a3-eeb4e7f8b862",
    "parent": {
      "_id": "app-instance-id"
    }
  },
  "user_attribution": {
    "tool": "cht_usr-1.0.6",
    "username": "medic",
    "created_time": 1706223990413
  },
  "reported_date": 1706223995945,
  "contact": {
    "_id": "3b49d6b0f1c0322c7d9ab20c29001d97",
    "parent": {
      "_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
      "parent": {
        "_id": "d44ba06d-4788-4576-b2a3-eeb4e7f8b862",
        "parent": {
          "_id": "app-instance-id"
        }
      }
    }
  }
}

Resulting Contact

{
  "_id": "3b49d6b0f1c0322c7d9ab20c29001d97",
  "_rev": "2-c4bdcff7fbaf50686ea61bb07c3f4373",
  "name": "Jonathan Bataire",
  "phone": "0712 344444",
  "date_of_birth": "1990 / 2 / 14",
  "sex": "Female",
  "type": "contact",
  "contact_type": "person",
  "user_attribution": {
    "tool": "cht_usr-1.0.6",
    "username": "medic",
    "created_time": 1706223990413
  },
  "reported_date": 1706223995961,
  "parent": {
    "_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
    "parent": {
      "_id": "d44ba06d-4788-4576-b2a3-eeb4e7f8b862",
      "parent": {
        "_id": "app-instance-id"
      }
    }
  }
}

Resulting User

{
  "_id": "org.couchdb.user:jonathan_bataire12",
  "_rev": "1-d2ac9b6b9e5e1841a0089078c0f84646",
  "name": "jonathan_bataire12",
  "type": "user",
  "roles": [
    "vht"
  ],
  "facility_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
  "password_scheme": "pbkdf2",
  "iterations": 10,
  "derived_key": "2cfb44caf2f6b3cf55ea0f4699274c60dbb184c1",
  "salt": "c68baa5acf3186122a62cb603ff53ac0"
}
jonathanbataire commented 8 months ago

@jonathanbataire @KicaRonaldOkello @tjovia

  • The credentials in 1pass for echis.health.go.ug are not working for me. Any ideas?
  • In the template, what is the light blue color indicating?
  • Since the template specifies the parent of the VHT, do we need to indicate the district, sub-district, county, sub-county, etc. Is this information available on the district-hospital parent? No worries if this needs to be specified each time, just checking.
  • What happens with the Supervisors table in this template? We want to create a user + contact at an existing place, but we don't want to create the place. Is that right?
  • Can you confirm that all phone numbers should require Uganda in-country numbers (eg 256 area code). Can test library here with default County as UG
  • Can you confirm, if the VHT's name is Jonathan Bataire then their area would be called Jonathan Bataire Area (village)?

@kennsippell thanks for this effort

jonathanbataire commented 8 months ago

@jonathanbataire @tjovia Here is where we are at today:

image image

Resulting Place

{
  "_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
  "_rev": "2-aeead55a9842ea04f799af1b439cce04",
  "name": "Jonathan Bataire Area (village)",
  "district": "Dist",
  "sub_district": "Subd",
  "county": "Count",
  "sub_county": "Subc",
  "parish": "Par",
  "village": "Vill",
  "type": "contact",
  "contact_type": "health_center",
  "parent": {
    "_id": "d44ba06d-4788-4576-b2a3-eeb4e7f8b862",
    "parent": {
      "_id": "app-instance-id"
    }
  },
  "user_attribution": {
    "tool": "cht_usr-1.0.6",
    "username": "medic",
    "created_time": 1706223990413
  },
  "reported_date": 1706223995945,
  "contact": {
    "_id": "3b49d6b0f1c0322c7d9ab20c29001d97",
    "parent": {
      "_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
      "parent": {
        "_id": "d44ba06d-4788-4576-b2a3-eeb4e7f8b862",
        "parent": {
          "_id": "app-instance-id"
        }
      }
    }
  }
}

Resulting Contact

{
  "_id": "3b49d6b0f1c0322c7d9ab20c29001d97",
  "_rev": "2-c4bdcff7fbaf50686ea61bb07c3f4373",
  "name": "Jonathan Bataire",
  "phone": "0712 344444",
  "date_of_birth": "1990 / 2 / 14",
  "sex": "Female",
  "type": "contact",
  "contact_type": "person",
  "user_attribution": {
    "tool": "cht_usr-1.0.6",
    "username": "medic",
    "created_time": 1706223990413
  },
  "reported_date": 1706223995961,
  "parent": {
    "_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
    "parent": {
      "_id": "d44ba06d-4788-4576-b2a3-eeb4e7f8b862",
      "parent": {
        "_id": "app-instance-id"
      }
    }
  }
}

Resulting User

{
  "_id": "org.couchdb.user:jonathan_bataire12",
  "_rev": "1-d2ac9b6b9e5e1841a0089078c0f84646",
  "name": "jonathan_bataire12",
  "type": "user",
  "roles": [
    "vht"
  ],
  "facility_id": "4802fcab-7d78-4a76-8957-d1f5b90a564a",
  "password_scheme": "pbkdf2",
  "iterations": 10,
  "derived_key": "2cfb44caf2f6b3cf55ea0f4699274c60dbb184c1",
  "salt": "c68baa5acf3186122a62cb603ff53ac0"
}
jonathanbataire commented 8 months ago

Also sex in the json should be lowercase

kennsippell commented 8 months ago

Dob should support just a number of years old and infer from today's date

Will address in #41

For supervisor yes the place already exists we are only creating the user and contact

Can there be multpile supervisors at the same place? If a second supervisor is created at the same place, what should happen? Just create the second user? Error? Replacement? Warning?

date_of_birth should be yyyy-mm-dd in the contact doc

Done in #41

"type": "health_center" instead of "contact_type": "health_center"

Opened #46

sex in the json should be lowercase

Done

since area name is generated from vht name it should come after vht name

Currently they can both be "Jonathan Bataire" and the alterations are handled automatically. I opened #47 but marked it as lower priority.

I dont think we should make it madatory for all phone numbers to include country code since the app runs only in Ug. it can be confusing for some people. Currently we take numbers with or without country code.

Functionality is as you describe. Any UG phone number with or without country code will be accepted and formatted.

@jonathanbataire