DrugTherapy extends AbstractPatientObject implements FrameAction { public int getStatusCount(MedStatus status) { if (statusCount.containsKey(status)) { return statusCount.get(status).intValue(); } return 0; } @JsonCreator  DrugTherapy(Map<String,Object> data);  DrugTherapy(Medication med);  DrugTherapy(MedType type, String name); String getName(); MedType getType(); String getGroupName(); boolean isRecent(); int getStatusCount(MedStatus status); PointInTime getTherapyStart(); PointInTime getTherapyStop(); boolean hasMeds(); SortedSet<Medication> getMeds(); void addMed(Medication med); Float[] calcDoseRange(); PointInTime getLastAdmin(); PointInTime getLastFill(); @JsonIgnore List<MedicationAdministration> getAllAdmins(); @JsonIgnore List<MedicationFill> getAllFills(); @Deprecated Map<String, Object> buildRow(Map<String, Object> params, HealthTimePrinterSet dateTimePrinters); static String getDrugTherapyUID(Medication med); static final Comparator<DrugTherapy> AZ_SORTER; static final Comparator<DrugTherapy> CLASS_SORTER; }
@Test public void testStatusCounts() { assertEquals(1, data.get("Outpatient Meds:CALCIUM CARBONATE TAB").getStatusCount(MedStatus.PENDING)); assertEquals(1, data.get("Inpatient Meds:SIMVASTATIN TAB").getStatusCount(MedStatus.ACTIVE)); assertEquals(9, data.get("Outpatient Meds:GLYBURIDE TAB").getStatusCount(MedStatus.DISCONTINUED)); assertEquals(2, data.get("Outpatient Meds:ASPIRIN TAB,EC").getStatusCount(MedStatus.EXPIRED)); }