Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update generate_consumables_item_codes_and_packages script #1290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EvaJanouskova
Copy link
Collaborator

In past, we merged manual changes in ResourceFile_Consumables_Items_and_Packages.csv, however this supposed to be generated by script generate_consumables_item_codes_and_packages. The script need to be updated to generate the version including the manual changes.

@EvaJanouskova
Copy link
Collaborator Author

EvaJanouskova commented Mar 5, 2024

We add here (within the commit generate_cons_item_pkgs: new consumables added to be included in RF_C…) new consumables into the RF_Consumables_Items_and_Pkgs by the generate_consumables_item_codes_and_packages script. In the PR #1124, it will need to be done manually for now as the script is not updated to generate the current version of the RF, see issue #1274.

@EvaJanouskova
Copy link
Collaborator Author

Hi @sakshimohan, as we discussed on slack. Once you have time for this, please update the generate_consumables_item_codes_and_packages script to generate the current master version of ResourceFile_Consumables_Items_and_Packages. Feel free to reach to me with any question.

Here, ResourceFile_Consumables_Items_and_Packages_generated.csv,
is what I think is now generated via generate_consumables_item_codes_and_packages script (only showing the part related to contraception methods as I think that's the only difference):

Intervention_Cat Intervention_Pkg Intervention_Pkg_Code Items Item_Code Expected_Units_Per_Case Unit_Cost
Maternal/Newborn and Reproductive Health Pill 0 Levonorgestrel 0.0375 mg, cycle 0 7.5 48.25212
Maternal/Newborn and Reproductive Health Pill 0 Levonorgestrel 0.15 mg + Ethinyl estradiol 30 mcg (Microgynon), cycle 1 7.5 53.35008
Maternal/Newborn and Reproductive Health Male condom 1 Condom, male 2 120 20.97018
Maternal/Newborn and Reproductive Health Injectable 2 Depot-Medroxyprogesterone Acetate 150 mg - 3 monthly 3 4 50.9439
Maternal/Newborn and Reproductive Health Injectable 2 Gloves, exam, latex, disposable, pair 4 4 31.90866
Maternal/Newborn and Reproductive Health Injectable 2 Povidone iodine, solution, 10 %, 5 ml per injection 5 4 2.00634
Maternal/Newborn and Reproductive Health Injectable 2 Syringe, Autodisable SoloShot IX 6 4 5.4264
Maternal/Newborn and Reproductive Health IUD 3 Gloves, exam, latex, disposable, pair 4 3 31.90866
Maternal/Newborn and Reproductive Health IUD 3 IUD, Copper T-380A 7 1 19.39224
Maternal/Newborn and Reproductive Health Implant 4 Gloves, exam, latex, disposable, pair 4 2 31.90866
Maternal/Newborn and Reproductive Health Implant 4 Lidocaine HCl (in dextrose 7.5%), ampoule 2 ml 8 2 52.00062
Maternal/Newborn and Reproductive Health Implant 4 Povidone iodine, solution, 10 %, 5 ml per injection 5 2 2.00634
Maternal/Newborn and Reproductive Health Implant 4 Syringe, needle + swab 9 2 7.7469
Maternal/Newborn and Reproductive Health Implant 4 Trocar 10 0.1 1203.99678
Maternal/Newborn and Reproductive Health Implant 4 Needle suture intestinal round bodied ½ circle trocar_6_CMST 11 0.2 115.99644
Maternal/Newborn and Reproductive Health Implant 4 Jadelle (implant), box of 2_CMST 12 0.5 447.22104
Maternal/Newborn and Reproductive Health Implant 4 Implanon (Etonogestrel 68 mg) 13 0.5 484.97022
Maternal/Newborn and Reproductive Health Female sterilization 5 Atropine sulphate, injection, 1 mg in 1 ml ampoule 14 1 17.99994
Maternal/Newborn and Reproductive Health Female sterilization 5 Diazepam, injection, 5 mg/ml, in 2 ml ampoule 15 1 130.47636
Maternal/Newborn and Reproductive Health Female sterilization 5 Lidocaine, injection, 1 % in 20 ml vial 16 1 149.99712
Maternal/Newborn and Reproductive Health Female sterilization 5 Lidocaine, spray, 10%, 500 ml bottle 17 0.02 1244.0022
Maternal/Newborn and Reproductive Health Female sterilization 5 Syringe, needle + swab 9 3 7.7469
Maternal/Newborn and Reproductive Health Female sterilization 5 Gauze pad, 10 x 10 cm, sterile 18 2 14.72268
Maternal/Newborn and Reproductive Health Female sterilization 5 Needle, suture, assorted sizes, round body 19 3 600.00276
Maternal/Newborn and Reproductive Health Female sterilization 5 Suture, catgut, chromic, 0, 150 cm 20 3 3744.0018
Maternal/Newborn and Reproductive Health Female sterilization 5 Tape, adhesive, 2.5 cm wide, zinc oxide, 5 m roll 21 1 426.10092
Maternal/Newborn and Reproductive Health Female sterilization 5 Gloves, surgeon’s, latex, disposable, sterile, pair 22 2 137.45928
Maternal/Newborn and Reproductive Health Female sterilization 5 Paracetamol, tablet, 500 mg 23 8 4.3554
Maternal/Newborn and Reproductive Health Female sterilization 5 Povidone iodine, solution, 10 %, 5 ml per injection 5 2 2.00634
Maternal/Newborn and Reproductive Health Female sterilization 5 Cotton swab 24 2 1.9992
Maternal/Newborn and Reproductive Health Male sterilization 6 Gauze pad, 10 x 10 cm, sterile 18 1 14.72268
Maternal/Newborn and Reproductive Health Male sterilization 6 Gloves, surgeon’s, latex, disposable, sterile, pair 22 1 137.45928
Maternal/Newborn and Reproductive Health Male sterilization 6 Lidocaine, injection, 1 % in 20 ml vial 16 1 149.99712
Maternal/Newborn and Reproductive Health Male sterilization 6 Needle, suture, assorted sizes, round body 19 1 600.00276
Maternal/Newborn and Reproductive Health Male sterilization 6 Povidone iodine, solution, 10 %, 5 ml per injection 5 1 2.00634
Maternal/Newborn and Reproductive Health Male sterilization 6 Suture, catgut, chromic, 0, 150 cm 20 1 3744.0018
Maternal/Newborn and Reproductive Health Male sterilization 6 Syringe, needle + swab 9 1 7.7469
Maternal/Newborn and Reproductive Health Male sterilization 6 Tape, adhesive, 2.5 cm wide, zinc oxide, 5 m roll 21 1 426.10092
Maternal/Newborn and Reproductive Health Female Condom 7 Female Condom_Each_CMST 25 120 33.72222

And here, ResourceFile_Consumables_Items_and_Packages_2024-05-15_master.csv, is what we have on the master branch:

Intervention_Cat Intervention_Pkg Intervention_Pkg_Code Items Item_Code Item_Code_Avail Expected_Units_Per_Case Unit_Cost Source_Cost_Item Source_ExpectedUnits
Maternal/Newborn and Reproductive Health Contraception initiation 164 Pregnancy Slide Test Kit (Human - Chorionic Gonadotrophin (Hcg))_100_MM192300_CMST, strip 2019 2019 1 32.164 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Pill 0 Ethinylestradiol 0.03mg + levonorgestrel 0.15mg_Each_FP000800_CMST, cycle //80% patients//; or Microlut (Levonorgestrel 0.03mg)_Each_FP004200_CMST, cycle //20% patients// 1 1 3.75 492.9423273778 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male condom 1 Condom, male 2 2 30 20.97 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Injectable 2 Medroxyprogesterone acetate injection 150mg/mL, 1mL vial with 2ml syringe with 22g 0.7 X 25mm needle_Each_BB049500_CMST, ampule 3 3 1 481.2 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Injectable 2 Glove disposable powdered latex medium_100_HH077700_CMST, pair 1933 135 1 37.1336 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Injectable 2 Water for injections, 10ml_Each_BB077100_CMST 98 98 1 31.63 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Injectable 2 Povidone iodine 10% solution_200ml_DN004470_CMST, 5 ml sachet 5 5 1 84.78 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Injectable 2 Gauze, swabs 8-ply 10cm x 10cm_100_FF010800_CMST 75 101 1 15.6377 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health IUD 3 Glove disposable powdered latex medium_100_HH077700_CMST, pair 1933 135 2 37.1336 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health IUD 3 IUD, Copper T-380A 7 7 1 26.42 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Glove disposable powdered latex medium_100_HH077700_CMST, pair 1933 135 3 37.1336 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Lidocaine HCl (in dextrose 7.5%), ampoule 2 ml 8 8 2 309.69 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Povidone iodine 10% solution_200ml_DN004470_CMST, 5 ml sachet 5 5 1 84.78 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Syringe, needle + swab 9 6 2 200 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Trocar 10 10 0.1 312 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Needle suture intestinal round bodied ½ circle trocar_6_CMST 11 11 1 178.75 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Implant 4 Jadelle(implant)_Each_FP003700_CMST, 2 rods //50% patients//; or Implanon (Etonogestrel 68mg)_Each_FP004100_CMST, 1 rod //50% patients// 12 12 1 760.11 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Implant 4 Gauze, swabs 8-ply 10cm x 10cm_100_FF010800_CMST 75 101 1 15.6377 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Lidocaine HCl (in dextrose 7.5%), ampoule 2 ml 8 8 1 309.69 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Atropine sulphate 600 micrograms/ml, 1ml_Each_BB006600_CMST //1 unit 50% patients → 0.5 units per case// 307 14 0.5 121.25 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Diazepam 5mg/ml, 2ml_Each_BB024000_CMST 15 15 1 130.36 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Syringe, autodestruct, 5ml, disposable, hypoluer with 21g needle_Each_HH150000_CMST + Alcohol swabs/wipes 70% isopropyl alcohol 100 pieces_100_FF000300_CMST 1960 6 3 153.5155 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Gauze, swabs 8-ply 10cm x 10cm_100_FF010800_CMST 75 101 2 15.6377 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Polyamide monofilament suture sterile 1, on 40mm 3/8 circle reverse cutting needle_12_GG005100_CMST 2676 11 3 178.765 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Catgut chromic suture sterile 0, 75cm, round bodied ½ circle 40mm needle_12_GG000600_CMST 2677 11 3 306.8841667 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Tape, adhesive, 2.5 cm wide, zinc oxide, 5 m roll 21 21 0.25 1558 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Female sterilization 5 Glove surgeons size 7 sterile_Pair_HH080400_CMST 112 135 2 302.24 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Paracetamol 500mg, tablets_1000_AA049500_CMST, tablet 23 23 8 4.38683 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Povidone iodine 10% solution_200ml_DN004470_CMST, 5 ml sachet 5 5 2 84.78 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Female sterilization 5 Cotton wool, 500g_Each_FF007800_CMST 49 24 0.2 2689.81 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Male sterilization 6 Gauze, swabs 8-ply 10cm x 10cm_100_FF010800_CMST 75 101 1 15.6377 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Glove surgeons size 7 sterile_Pair_HH080400_CMST 112 135 1 302.24 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Lidocaine, injection, 1 % in 20 ml vial 16 16 1 260 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Polyamide monofilament suture sterile 1, on 40mm 3/8 circle reverse cutting needle_12_GG005100_CMST 2676 11 1 178.765 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Povidone iodine 10% solution_200ml_DN004470_CMST, 5 ml sachet 5 5 1 84.78 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Catgut chromic suture sterile 0, 75cm, round bodied ½ circle 40mm needle_12_GG000600_CMST 2677 11 1 306.8841667 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Syringe, autodestruct, 5ml, disposable, hypoluer with 21g needle_Each_HH150000_CMST + Alcohol swabs/wipes 70% isopropyl alcohol 100 pieces_100_FF000300_CMST 1960 6 1 153.5155 Malawi EHP 2021 OHT 2016
Maternal/Newborn and Reproductive Health Male sterilization 6 Tape, adhesive, 2.5 cm wide, zinc oxide, 5 m roll 21 21 0.125 1158 Malawi EHP 2021 Malawi EHP 2021
Maternal/Newborn and Reproductive Health Female Condom 7 Female Condom_Each_FP003500_CMST 25 25 30 22.16 Malawi EHP 2021 OHT 2016

@EvaJanouskova
Copy link
Collaborator Author

The columns, Item_Code_Avail, Source_Cost_Item, and Source_ExpectedUnits are only filled in for contraception related items, but now with what you have done and are doing right now, these may not be needed anymore.

The purpose of Item_Code_Avail was to use an alternative item code for availability as these items were not included in the availability RF. But if I remember correctly, you fixed this already and the availability for these is now approximated with availability of similar items automatically, isn't it? If so, I will remove this in separate PR.

If I understand your current work, the unit costs in the RF_..Items_and_Pkgs will be soon updated with the Final_price_per_chosen_unit (MWK, year of original cost), is that so? There you have covered the sources of costs, could be then information about the source of that cost generated into the column Source_Cost_Item? This is where the modellers look up the information on items, so I think it would be helpful to know that too, especially the year of the cost estimate.

And I would still vote on having the Expected_Units_Per_Case, not necessarily filled for all items, but it's essential to be able to use the get_item_codes_from_package_name() fnc. Ideally if expected units coming also from the RF_Costing/consumables if also other information will be generated from there. I used two sources for the Expected units per case OHT 2016, and where not possible Malawi EHP 2021 (as suggested by Emi because the excepted units in EHP where mostly suspiciously weird). So we could add these into RF_Costing, and then only generate the final used source to appear in RF_...Items_and_Pkgs.

@EvaJanouskova
Copy link
Collaborator Author

@matt-graham, @tamuri, @tbhallett, Could we have a test for Resource Files like this (ie, not created manually, but generated by a script) to assure no one has manually made a change in that RF?

I had no idea it was generated by a script, so I made all the changes manually, but if it caused the test to fail, I might have known.

@EvaJanouskova
Copy link
Collaborator Author

@sakshimohan, For some reason, which I can't remember exactly, we chose different gloves for some methods than what was originally there. If you want, I think we could return it, because I don't think it's necessary. (This may have been because we wanted to have them all from the same source (EHP 2021).)

@EvaJanouskova
Copy link
Collaborator Author

@sakshimohan
We added two new items for female sterilisation which are not in the version of RF_Items&Pkgs in the #1298:

  • 'Polyamide monofilament suture sterile 1, on 40mm 3/8 circle reverse cutting needle_12_GG005100_CMST'
  • 'Catgut chromic suture sterile 0, 75cm, round bodied ½ circle 40mm needle_12_GG000600_CMST'

Hence I use what used to be there before in #1298 when re-coding the consumables for contraception:

  • 'Needle, suture, assorted sizes, round body'
  • 'Suture, catgut, chromic, 0, 150 cm'

Would you know if there is difference between these, or should we just go back to the original items? It doesn't seem to me to be the same, but maybe it is close enough?

@tbhallett
Copy link
Collaborator

@sakshimohan We added two new items for female sterilisation which are not in the version of RF_Items&Pkgs in the #1298:

  • 'Polyamide monofilament suture sterile 1, on 40mm 3/8 circle reverse cutting needle_12_GG005100_CMST'
  • 'Catgut chromic suture sterile 0, 75cm, round bodied ½ circle 40mm needle_12_GG000600_CMST'

Hence I use what used to be there before in #1298 when re-coding the consumables for contraception:

  • 'Needle, suture, assorted sizes, round body'
  • 'Suture, catgut, chromic, 0, 150 cm'

Would you know if there is difference between these, or should we just go back to the original items? It doesn't seem to me to be the same, but maybe it is close enough?

Those things look very close to one another to me. If at all possible, I would certainly say to use the items that were defined originally in the ResourceFile without resorting to adding additional items.

@EvaJanouskova
Copy link
Collaborator Author

@matt-graham, @tamuri, @tbhallett, Could we have a test for Resource Files like this (ie, not created manually, but generated by a script) to assure no one has manually made a change in that RF?

I had no idea it was generated by a script, so I made all the changes manually, but if it caused the test to fail, I might have known.

I opened an issue for this: #1385.

@EvaJanouskova
Copy link
Collaborator Author

@sakshimohan, I think we can close this PR as we do all differently now, ie we are not using the packages to get the consumable item codes in contraception module anymore and all was re-coded to use the existing names from ResourceFile_Consumables_Items_and_Packages.csv , do you agree?

@tbhallett
Copy link
Collaborator

@sakshimohan, I think we can close this PR as we do all differently now, ie we are not using the packages to get the consumable item codes in contraception module anymore and all was re-coded to use the existing names from ResourceFile_Consumables_Items_and_Packages.csv , do you agree?

That being the case, I think we need a PR to roll back the manual changes that were made (but now no longer used) so that we're back to the situation of the ResourceFile being regenerable from the processing scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for EM review
Development

Successfully merging this pull request may close these issues.

3 participants