Skip to content

Commit

Permalink
OLMIS-7807: Changed the name and source of the requisition template c…
Browse files Browse the repository at this point in the history
…olumn (#89)
  • Loading branch information
sradziszewski authored Nov 6, 2023
1 parent 278edf0 commit da1c4ce
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ private boolean getColumnDisplayConditions(RequisitionTemplateColumn column) {
private boolean getColumnNameConditions(RequisitionTemplateColumn column) {
return !("pricePerPack".equals(column.getName())
|| "orderable.dispensable.displayUnit".equals(column.getName())
|| "orderable.productCode".equals(column.getName()));
|| "orderable.productCode".equals(column.getName())
|| "dosesPerPatient".equals(column.getName()));
}

private void setNullForField(RequisitionLineItem lineItem, RequisitionTemplateColumn column) {
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/db/demo-data/requisition.columns_maps.csv
Original file line number Diff line number Diff line change
Expand Up @@ -148,37 +148,37 @@ requisitionTemplateId,key,name,label,indicator,displayOrder,isDisplayed,source,d
14e756d2-60a6-45fd-b135-3caff3f328cd,maximumStockQuantity,maximumStockQuantity,Maximum stock quantity,H,23,false,1,Maximum stock calculated based on consumption and max stock amounts. Quantified in dispensing units.,913e1a4f-f3b0-40c6-a422-2f73608c6f3d,ff2b350c-37f2-4801-b21e-27ca12c12b3c,
14e756d2-60a6-45fd-b135-3caff3f328cd,additionalQuantityRequired,additionalQuantityRequired,Additional quantity required,Z,24,false,0,Additional quantity required for new patients,90a84767-1009-4d8e-be13-f006fce2a002,,
5a268780-fafd-4243-9551-5c7daa824913,numberOfPatientsOnTreatmentNextMonth,numberOfPatientsOnTreatmentNextMonth,No of Patients on Treatment next month (C),TC,7,false,1,The number of patients who will be treated in the next month.,ef7c65c6-1be3-410b-9a2e-8b9f68221e82,,
5a268780-fafd-4243-9551-5c7daa824913,programOrderables.dosesperpatient,programOrderables.dosesperpatient,Individual Monthly Requirement (D),TD,8,false,1,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
5a268780-fafd-4243-9551-5c7daa824913,dosesPerPatient,dosesPerPatient,Individual Monthly Requirement (D),TD,8,false,2,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
5a268780-fafd-4243-9551-5c7daa824913,totalRequirement,totalRequirement,Total Requirement (E) E = C * D,TE,9,false,1,Product requirement for all patients.,7563a92f-2c07-4b09-a88e-d0faa0baee93,,
5a268780-fafd-4243-9551-5c7daa824913,totalQuantityNeededByHf,totalQuantityNeededByHf,Total Quantity Needed by HF (F) F = E * 2,TF,10,false,1,Total quantity of product needed by Health Facility.,d58e83a3-78ee-4657-b3d9-7b1adc983837,,
5a268780-fafd-4243-9551-5c7daa824913,quantityToIssue,quantityToIssue,Quantity to issue (G) G = F - A,TG,11,false,1,Number of products to be issued.,421cd415-f127-4683-a396-a10a7bfdc384,,
5a268780-fafd-4243-9551-5c7daa824913,convertedQuantityToIssue,convertedQuantityToIssue,Quantity to issue (converted to unit of measure) G/U,TH,12,false,1,Quantity to issue expressed in the units in which it is measured.,d173872d-f5e7-48a2-b0a7-c7fcae4208d4,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,numberOfPatientsOnTreatmentNextMonth,numberOfPatientsOnTreatmentNextMonth,No of Patients on Treatment next month (C),TC,7,false,1,The number of patients who will be treated in the next month.,ef7c65c6-1be3-410b-9a2e-8b9f68221e82,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,programOrderables.dosesperpatient,programOrderables.dosesperpatient,Individual Monthly Requirement (D),TD,8,false,1,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,dosesPerPatient,dosesPerPatient,Individual Monthly Requirement (D),TD,8,false,2,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,totalRequirement,totalRequirement,Total Requirement (E) E = C * D,TE,9,false,1,Product requirement for all patients.,7563a92f-2c07-4b09-a88e-d0faa0baee93,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,totalQuantityNeededByHf,totalQuantityNeededByHf,Total Quantity Needed by HF (F) F = E * 2,TF,10,false,1,Total quantity of product needed by Health Facility.,d58e83a3-78ee-4657-b3d9-7b1adc983837,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,quantityToIssue,quantityToIssue,Quantity to issue (G) G = F - A,TG,11,false,1,Number of products to be issued.,421cd415-f127-4683-a396-a10a7bfdc384,,
4b30f6c9-b84b-4f17-8173-852101a5ea29,convertedQuantityToIssue,convertedQuantityToIssue,Quantity to issue (converted to unit of measure) G/U,TH,12,false,1,Quantity to issue expressed in the units in which it is measured.,d173872d-f5e7-48a2-b0a7-c7fcae4208d4,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,numberOfPatientsOnTreatmentNextMonth,numberOfPatientsOnTreatmentNextMonth,No of Patients on Treatment next month (C),TC,7,false,1,The number of patients who will be treated in the next month.,ef7c65c6-1be3-410b-9a2e-8b9f68221e82,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,programOrderables.dosesperpatient,programOrderables.dosesperpatient,Individual Monthly Requirement (D),TD,8,false,1,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,dosesPerPatient,dosesPerPatient,Individual Monthly Requirement (D),TD,8,false,2,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,totalRequirement,totalRequirement,Total Requirement (E) E = C * D,TE,9,false,1,Product requirement for all patients.,7563a92f-2c07-4b09-a88e-d0faa0baee93,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,totalQuantityNeededByHf,totalQuantityNeededByHf,Total Quantity Needed by HF (F) F = E * 2,TF,10,false,1,Total quantity of product needed by Health Facility.,d58e83a3-78ee-4657-b3d9-7b1adc983837,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,quantityToIssue,quantityToIssue,Quantity to issue (G) G = F - A,TG,11,false,1,Number of products to be issued.,421cd415-f127-4683-a396-a10a7bfdc384,,
6c4b004b-b7c9-46f0-bb1b-bd128d36729f,convertedQuantityToIssue,convertedQuantityToIssue,Quantity to issue (converted to unit of measure) G/U,TH,12,false,1,Quantity to issue expressed in the units in which it is measured.,d173872d-f5e7-48a2-b0a7-c7fcae4208d4,,
37f29736-f0db-4de3-98ad-f8d85c848711,numberOfPatientsOnTreatmentNextMonth,numberOfPatientsOnTreatmentNextMonth,No of Patients on Treatment next month (C),TC,7,false,1,The number of patients who will be treated in the next month.,ef7c65c6-1be3-410b-9a2e-8b9f68221e82,,
37f29736-f0db-4de3-98ad-f8d85c848711,programOrderables.dosesperpatient,programOrderables.dosesperpatient,Individual Monthly Requirement (D),TD,8,false,1,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
37f29736-f0db-4de3-98ad-f8d85c848711,dosesPerPatient,dosesPerPatient,Individual Monthly Requirement (D),TD,8,false,2,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
37f29736-f0db-4de3-98ad-f8d85c848711,totalRequirement,totalRequirement,Total Requirement (E) E = C * D,TE,9,false,1,Product requirement for all patients.,7563a92f-2c07-4b09-a88e-d0faa0baee93,,
37f29736-f0db-4de3-98ad-f8d85c848711,totalQuantityNeededByHf,totalQuantityNeededByHf,Total Quantity Needed by HF (F) F = E * 2,TF,10,false,1,Total quantity of product needed by Health Facility.,d58e83a3-78ee-4657-b3d9-7b1adc983837,,
37f29736-f0db-4de3-98ad-f8d85c848711,quantityToIssue,quantityToIssue,Quantity to issue (G) G = F - A,TG,11,false,1,Number of products to be issued.,421cd415-f127-4683-a396-a10a7bfdc384,,
37f29736-f0db-4de3-98ad-f8d85c848711,convertedQuantityToIssue,convertedQuantityToIssue,Quantity to issue (converted to unit of measure) G/U,TH,12,false,1,Quantity to issue expressed in the units in which it is measured.,d173872d-f5e7-48a2-b0a7-c7fcae4208d4,,
6fa1a58c-960b-4835-be22-05be5f7357e2,numberOfPatientsOnTreatmentNextMonth,numberOfPatientsOnTreatmentNextMonth,No of Patients on Treatment next month (C),TC,7,false,1,The number of patients who will be treated in the next month.,ef7c65c6-1be3-410b-9a2e-8b9f68221e82,,
6fa1a58c-960b-4835-be22-05be5f7357e2,programOrderables.dosesperpatient,programOrderables.dosesperpatient,Individual Monthly Requirement (D),TD,8,false,1,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
6fa1a58c-960b-4835-be22-05be5f7357e2,dosesPerPatient,dosesPerPatient,Individual Monthly Requirement (D),TD,8,false,2,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
6fa1a58c-960b-4835-be22-05be5f7357e2,totalRequirement,totalRequirement,Total Requirement (E) E = C * D,TE,9,false,1,Product requirement for all patients.,7563a92f-2c07-4b09-a88e-d0faa0baee93,,
6fa1a58c-960b-4835-be22-05be5f7357e2,totalQuantityNeededByHf,totalQuantityNeededByHf,Total Quantity Needed by HF (F) F = E * 2,TF,10,false,1,Total quantity of product needed by Health Facility.,d58e83a3-78ee-4657-b3d9-7b1adc983837,,
6fa1a58c-960b-4835-be22-05be5f7357e2,quantityToIssue,quantityToIssue,Quantity to issue (G) G = F - A,TG,11,false,1,Number of products to be issued.,421cd415-f127-4683-a396-a10a7bfdc384,,
6fa1a58c-960b-4835-be22-05be5f7357e2,convertedQuantityToIssue,convertedQuantityToIssue,Quantity to issue (converted to unit of measure) G/U,TH,12,false,1,Quantity to issue expressed in the units in which it is measured.,d173872d-f5e7-48a2-b0a7-c7fcae4208d4,,
14e756d2-60a6-45fd-b135-3caff3f328cd,numberOfPatientsOnTreatmentNextMonth,numberOfPatientsOnTreatmentNextMonth,No of Patients on Treatment next month (C),TC,7,false,1,The number of patients who will be treated in the next month.,ef7c65c6-1be3-410b-9a2e-8b9f68221e82,,
14e756d2-60a6-45fd-b135-3caff3f328cd,programOrderables.dosesperpatient,programOrderables.dosesperpatient,Individual Monthly Requirement (D),TD,8,false,1,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
14e756d2-60a6-45fd-b135-3caff3f328cd,dosesPerPatient,dosesPerPatient,Individual Monthly Requirement (D),TD,8,false,2,The amount of product for single patient.,3efdf855-cc03-4ccc-97f2-60108bc4b7a3,,
14e756d2-60a6-45fd-b135-3caff3f328cd,totalRequirement,totalRequirement,Total Requirement (E) E = C * D,TE,9,false,1,Product requirement for all patients.,7563a92f-2c07-4b09-a88e-d0faa0baee93,,
14e756d2-60a6-45fd-b135-3caff3f328cd,totalQuantityNeededByHf,totalQuantityNeededByHf,Total Quantity Needed by HF (F) F = E * 2,TF,10,false,1,Total quantity of product needed by Health Facility.,d58e83a3-78ee-4657-b3d9-7b1adc983837,,
14e756d2-60a6-45fd-b135-3caff3f328cd,quantityToIssue,quantityToIssue,Quantity to issue (G) G = F - A,TG,11,false,1,Number of products to be issued.,421cd415-f127-4683-a396-a10a7bfdc384,,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
UPDATE requisition.available_requisition_columns
SET name = 'dosesPerPatient'
WHERE id = '3efdf855-cc03-4ccc-97f2-60108bc4b7a3';

UPDATE requisition.columns_maps
SET name = 'dosesPerPatient', key = 'dosesPerPatient', source = 2
WHERE requisitioncolumnid = '3efdf855-cc03-4ccc-97f2-60108bc4b7a3';

0 comments on commit da1c4ce

Please sign in to comment.