Skip to content

Commit

Permalink
chore: move other drug concepts to constant (#105)
Browse files Browse the repository at this point in the history
Signed-off-by: Kathurima Kimathi <[email protected]>
  • Loading branch information
KathurimaKimathi authored Aug 25, 2023
1 parent 350e8af commit 52ddf9e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.Allergies.ALLERGY_OTHER_REACTION;
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.Allergies.ALLERGY_REACTION_CONCEPTS;
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.Allergies.ALLERGY_SEVERITY_CONCEPTS;
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.Allergies.OTHER_DRUG_CONCEPTS;
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.Medications.REGIMEN;
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.Tests.TESTS_ORDERED;
import static org.openmrs.module.mycarehub.utils.Constants.MedicalRecordConcepts.VitalSigns.BMI;
Expand All @@ -27,7 +28,6 @@

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.hibernate.Criteria;
Expand Down Expand Up @@ -201,12 +201,7 @@ private List<Integer> getDrugsConceptsList() {
List<Integer> fullDrugConcepts = new ArrayList<Integer>();
fullDrugConcepts.addAll(drugsConcepts.list());

Integer[] otherDrugConcepts = {
164505, 1652, 160124, 162565, 162563, 162199, 792, 160104, 1652, 160124, 162561, 162200,
164505, 162559, 164508, 164509, 164510, 162200, 162561, 164505, 162563, 162201, 164508,
164509, 164510, 162561, 164511, 162201, 164512, 162200
};
fullDrugConcepts.addAll(Arrays.asList(otherDrugConcepts));
fullDrugConcepts.addAll(OTHER_DRUG_CONCEPTS);
return fullDrugConcepts;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Constants {
Expand Down Expand Up @@ -155,6 +156,12 @@ public static final class Allergies {
};

public static final int ALLERGY_DATE = 160753;

public static final List<Integer> OTHER_DRUG_CONCEPTS =
Arrays.asList(
164505, 1652, 160124, 162565, 162563, 162199, 792, 160104, 1652, 160124, 162561,
162200, 164505, 162559, 164508, 164509, 164510, 162200, 162561, 164505, 162563,
162201, 164508, 164509, 164510, 162561, 164511, 162201, 164512, 162200);
}
}

Expand Down

0 comments on commit 52ddf9e

Please sign in to comment.