-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Spice up the inventory / formulary code
-Separate ViewModels for custom/existing/formulary pages -Update instructions -Better error handeling for custom medications
- Loading branch information
Kevin Zurek
committed
May 18, 2017
1 parent
53f1693
commit 66d17ca
Showing
12 changed files
with
421 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
app/femr/ui/models/admin/inventory/CustomViewModelGet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package femr.ui.models.admin.inventory; | ||
|
||
import femr.common.models.MissionTripItem; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by kevin on 14/05/17. | ||
*/ | ||
public class CustomViewModelGet { | ||
|
||
private List<String> availableUnits; | ||
private List<String> availableForms; | ||
private MissionTripItem missionTripItem; | ||
|
||
public List<String> getAvailableUnits() { | ||
return availableUnits; | ||
} | ||
|
||
public void setAvailableUnits(List<String> availableUnits) { | ||
this.availableUnits = availableUnits; | ||
} | ||
|
||
public List<String> getAvailableForms() { | ||
return availableForms; | ||
} | ||
|
||
public void setAvailableForms(List<String> availableForms) { | ||
this.availableForms = availableForms; | ||
} | ||
|
||
public MissionTripItem getMissionTripItem() { | ||
return missionTripItem; | ||
} | ||
|
||
public void setMissionTripItem(MissionTripItem missionTripItem) { | ||
this.missionTripItem = missionTripItem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
app/femr/ui/models/admin/inventory/ExistingViewModelGet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package femr.ui.models.admin.inventory; | ||
|
||
import femr.common.models.MedicationItem; | ||
import femr.common.models.MissionTripItem; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Created by kevin on 14/05/17. | ||
*/ | ||
public class ExistingViewModelGet { | ||
|
||
private List<MedicationItem> conceptMedications; | ||
private MissionTripItem missionTripItem; | ||
|
||
public List<MedicationItem> getConceptMedications() { | ||
return conceptMedications; | ||
} | ||
|
||
public void setConceptMedications(List<MedicationItem> conceptMedications) { | ||
this.conceptMedications = conceptMedications; | ||
} | ||
|
||
public MissionTripItem getMissionTripItem() { | ||
return missionTripItem; | ||
} | ||
|
||
public void setMissionTripItem(MissionTripItem missionTripItem) { | ||
this.missionTripItem = missionTripItem; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
app/femr/ui/models/admin/inventory/ExistingViewModelPost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package femr.ui.models.admin.inventory; | ||
|
||
import java.util.List; | ||
|
||
public class ExistingViewModelPost { | ||
|
||
//this is a list of IDs that come out of the select2 textbox for adding | ||
//existing medicine. | ||
private List<Integer> newConceptMedicationsForInventory; | ||
|
||
public List<Integer> getNewConceptMedicationsForInventory() { | ||
return newConceptMedicationsForInventory; | ||
} | ||
|
||
public void setNewConceptMedicationsForInventory(List<Integer> newConceptMedicationsForInventory) { | ||
this.newConceptMedicationsForInventory = newConceptMedicationsForInventory; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.