|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mars_sim.msp.simulation.person.medical.MedicalStation
public class MedicalStation
This class represents a medical station. It provides a number of Treatments to Persons, these are defined in the Medical.xml file.
| Constructor Summary | |
|---|---|
MedicalStation(int level,
int sickBeds)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
canTreatProblem(HealthProblem problem)
Checks if a health problem can be treated at this medical station. |
int |
getPatientNum()
Gets the current number of people being treated here. |
java.util.Collection<Person> |
getPatients()
Gets the patients at this medical station. |
java.util.List<HealthProblem> |
getProblemsAwaitingTreatment()
Gets the health problems awaiting treatment at the medical station. |
java.util.List<HealthProblem> |
getProblemsBeingTreated()
Gets the health problems currently being treated at the medical station. |
int |
getSickBedNum()
Gets the number of sick beds. |
java.util.List<Treatment> |
getSupportedTreatments()
Get a list of supported Treatments at this SickBay. |
int |
getTreatmentLevel()
Gets the treatment level of the medical station. |
void |
requestTreatment(HealthProblem problem)
Add a health problem to the queue of problems awaiting treatment at this medical station. |
void |
startTreatment(HealthProblem problem,
double treatmentDuration)
Starts the treatment of a health problem in the waiting queue. |
void |
stopTreatment(HealthProblem problem)
Stop a previously started treatment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MedicalStation(int level,
int sickBeds)
level - The treatment level of the medical station.sickBeds - Number of sickbeds.| Method Detail |
|---|
public java.util.List<HealthProblem> getProblemsAwaitingTreatment()
getProblemsAwaitingTreatment in interface MedicalAidpublic java.util.List<HealthProblem> getProblemsBeingTreated()
getProblemsBeingTreated in interface MedicalAidpublic int getSickBedNum()
public int getPatientNum()
public java.util.Collection<Person> getPatients()
public java.util.List<Treatment> getSupportedTreatments()
getSupportedTreatments in interface MedicalAidpublic boolean canTreatProblem(HealthProblem problem)
canTreatProblem in interface MedicalAidproblem - The health problem to check treatment.
public void requestTreatment(HealthProblem problem)
throws java.lang.Exception
requestTreatment in interface MedicalAidproblem - The health problem to await treatment.
java.lang.Exception - if health problem cannot be treated here.
public void startTreatment(HealthProblem problem,
double treatmentDuration)
throws java.lang.Exception
startTreatment in interface MedicalAidproblem - the health problem to start treating.treatmentDuration - the time required to perform the treatment.
java.lang.Exception - if treatment cannot be started.
public void stopTreatment(HealthProblem problem)
throws java.lang.Exception
stopTreatment in interface MedicalAidproblem - Health problem stopping treatment on.
java.lang.Exception - if health problem is not being treated.public int getTreatmentLevel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||