Skip to content

Commit

Permalink
Merge pull request #568 from msupply-foundation/567-tetanus-not-loading
Browse files Browse the repository at this point in the history
fix tetanus vaccine code
  • Loading branch information
lache-melvin authored Feb 1, 2024
2 parents ca9f21b + 00a0c46 commit 8fc4b6a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data-loader/data/v2/vaccines.csv
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ Rotavirus Vaccine,61c5e4bf,,Oral,60235e8bc,Suspension,ba32ec9c3,,,G1P(8) strain,
Rotavirus Vaccine,61c5e4bf,,Oral,60235e8bc,Suspension,ba32ec9c3,,,"G1, G2, G3, G4, P1A(8) strain",fe815b974,RotaTeq,149e3694b,2x10^6 infective units x 5 strains,ea0226cc3,2 ml,45362561d,,,,,1007640,19.3,19.3,29448361000116107,29448421000116107,51201618,
Rubella Vaccine,620294bf,,Intramuscular,e97a1dad5,Injection (powder for),d3de859a8,,,Wistar RA 27/3 strain ,0eae15d25,Undefined,4f1de8891,1000 CCID50,21f583313,0.5 ml,728a24a24,Vial with diluent,d7934edda,,,762817,19.3,19.3,,,51201619,
Rubella Vaccine,620294bf,,Intramuscular,e97a1dad5,Injection (powder for),d3de859a8,,,Wistar RA 27/3 strain ,0eae15d25,Undefined,4f1de8891,1000 CCID50 per dose,9e32ea3ad,1 ml,4bda94cc0,Vial with diluent,e762683de,2 doses,1443cfcc5,762817,19.3,19.3,,,51201619,
Rubella Vaccine ,620294bf,,Intramuscular,e97a1dad5,Injection (powder for),d3de859a8,,,Wistar RA 27/3 strain,0eae15d25,Undefined,4f1de8891,1000 CCID50 per dose,9e32ea3ad,2.5 ml,d715dc79e,Vial with diluent,4bda94cc0,5 doses,9fb7828ed,762817,19.3,19.3,,,51201619,
Rubella Vaccine ,620294bf,,Intramuscular,e97a1dad5,Injection (powder for),d3de859a8,,,Wistar RA 27/3 strain,0eae15d25,Undefined,4f1de8891,1000 CCID50 per dose,9e32ea3ad,2.5 ml,d715dc79e,Vial with diluent,d7a2cb181,5 doses,9fb7828ed,762817,19.3,19.3,,,51201619,
Rubella Vaccine,620294bf,,Intramuscular,e97a1dad5,Injection (powder for),d3de859a8,,,Wistar RA 27/3 strain,0eae15d25,Undefined,4f1de8891,1000 CCID50 per dose,9e32ea3ad,5 ml,4771548f5,Vial with diluent,23a7376db,10 doses,3c33c29a8,762817,19.3,19.3,,,51201619,
Tetanus Toxoid Vaccine,64ed34bf,TT,Intramuscular,9b9691784,Injection (suspension),e65f8bc88,,,Undefined,fb4a8f96f,Undefined,b1720763f,10Lf [40IU],cae7facb0,0.5 ml,9c36b4ae1,Vial,08b593d55,,,798306,19.3,19.3,,,51201621,
Tetanus Toxoid Vaccine,64ed34bf,TT,Intramuscular,9b9691784,Injection (suspension),e65f8bc88,,,Undefined,fb4a8f96f,Undefined,b1720763f,10Lf [40IU] per dose,36ccad6c3,5 ml,7849729ca,Vial,ca986d082,10 doses,f5425bfae,798306,19.3,19.3,,,51201621,
Tetanus Toxoid Vaccine,64ed34bf,TT,Intramuscular,9b9691784,Injection (suspension),e65f8bc88,,,Undefined,fb4a8f96f,Undefined,b1720763f,10Lf [40IU] per dose,36ccad6c3,10 ml,63e117987,Vial,930a43c27,20 doses,7840cc75b,798306,19.3,19.3,,,51201621,
Tetanus Toxoid Vaccine,64ed34bf,TT,Intramuscular,9b9691784,Injection (suspension),e65f8bc88,,,Undefined,fb4a8f96f,Undefined,b1720763f,10Lf [40IU],10Lf [40IU],0.5 ml,9c36b4ae1,Pre-filled syringe,d28bc1e14,,,798306,19.3,19.3,,,51201621,
Tetanus Toxoid Vaccine,64ed34bf,TT,Intramuscular,9b9691784,Injection (suspension),e65f8bc88,,,Undefined,fb4a8f96f,Undefined,b1720763f,10Lf [40IU],c7929cc2b,0.5 ml,9c36b4ae1,Pre-filled syringe,d28bc1e14,,,798306,19.3,19.3,,,51201621,
Tetanus Toxoid Vaccine,64ed34bf,TT,Intramuscular,9b9691784,Injection (suspension),e65f8bc88,,,Undefined,fb4a8f96f,Undefined,b1720763f,5Lf [40IU],317ff5999,0.5 ml,d2f6b7e2b,Ampoule,3e69e2639,,,798306,19.3,19.3,,,51201621,
Tick-Borne Encephalitis Vaccine,659f44bf,TBE,Intramuscular,85c28fe9c,Injection (suspension),66ac7576c,,,Tick borne encephalitis virus,aa54d178a,TicoVac,a48f17629,2.4mcg,13a911bbd,0.5 ml,612a4d775,Pre-filled syringe,13e3a4275,,,,19.3,19.3,44741001000116109,44741071000116103,,
Tick-Borne Encephalitis Vaccine,659f44bf,TBE,Intramuscular,85c28fe9c,Injection (suspension),66ac7576c,,,Tick borne encephalitis virus,aa54d178a,TicoVac Junior,f7245545f,2.4mcg,515cbe2ff,0.25 ml,d1ac1d094,Pre-filled syringe,5b4836ddc,,,,19.3,19.3,44741001000116109,44746261000116106,,
Expand Down
8 changes: 8 additions & 0 deletions data-loader/src/v2/ConsumableDataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ export class ConsumableDataParser {
productDefinition.forEach(item => {
if (!item.code) return;

const regex = /^[A-Za-z0-9]+$/;
if (!regex.test(item.code)) {
console.log(
`WARNING: Code ${item.code} contains non-alphanumeric characters! Skipping...`
);
return;
}

if (item.code in graph) {
// check for conflicts.
if (item.type && graph[item.code].type != item.type) {
Expand Down
8 changes: 8 additions & 0 deletions data-loader/src/v2/DrugDataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ export class DrugDataParser {
productDefinition.forEach(item => {
if (!item.code) return;

const regex = /^[A-Za-z0-9]+$/;
if (!regex.test(item.code)) {
console.log(
`WARNING: Code ${item.code} contains non-alphanumeric characters! Skipping...`
);
return;
}

if (item.code in graph) {
// check for conflicts.
if (item.type && graph[item.code].type != item.type) {
Expand Down
8 changes: 8 additions & 0 deletions data-loader/src/v2/VaccineDataParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ export class VaccineDataParser {
productDefinition.forEach(item => {
if (!item.code) return;

const regex = /^[A-Za-z0-9]+$/;
if (!regex.test(item.code)) {
console.log(
`WARNING: Code ${item.code} contains non-alphanumeric characters! Skipping...`
);
return;
}

if (item.code in graph) {
// check for conflicts.
if (item.type && graph[item.code].type != item.type) {
Expand Down

0 comments on commit 8fc4b6a

Please sign in to comment.