agents

## Class Person

- java.lang.Object
- - agents.Agent
  - - agents.Person

-     public class Person
      extends Agent

  Version:
    1.0
  Author:
    Alan Mills

    This class implements the Person agent. The Person agent is an individual inhabitant of the community. A Person assess the quality of physician performance, chooses a primary care physician, requests treatment from a physician, and complies with treatment recommendations.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Person(repast.simphony.context.Context<java.lang.Object> pContext, AgentID pPersonID)` Constructs a Person agent.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `chart_GetDisease1Count()` Counts the number of Persons with Disease 1.
    `int` | `chart_GetDisease2Count()` Counts the number of Persons with Disease 2.
    `int` | `chart_GetDiseaseStatus()` Provides the Person's health status as an integer (0, 1, or 2).
    `int` | `chart_GetImproperlyTreatedPatientTypeCount()` Counts the number of "improperly treated" patients.
    `int` | `chart_GetNoncompliantPatientTypeCount()` Counts the number of "noncompliant" patients.
    `int` | `chart_GetNonrequestingPatientTypeCount()` Counts the number of "non-requesting" patients.
    `int` | `chart_GetPCPTreatmentRequestedCount()` Counts the number of Persons who requested a PCP treatment.
    `int` | `chart_GetProperlyTreatedPatientTypeCount()` Counts the number of "properly treated" patients.
    `int` | `chart_GetSpecialistTreatmentRequestedCount()` Counts the number of Persons who requested a Specialist treatment.
    `int` | `chart_GetUntreatedPatientTypeCount()` Counts the number of "untreated" patients.
    `Constants.Disease` | `getCurrentDiseaseStatus()` Returns the Person's current disease status.
    `AgentID` | `getCurrentPCP()` Returns the Person's current PCP.
    `java.lang.String` | `getCurrentPCPString()` Returns the identification number of the current PCP as a string.
    `java.util.ArrayList<AnnualDiseaseStatus>` | `getDiseaseStatusHistory()` Returns the Person's current disease status.
    `int` | `getIntegerCurrentDiseaseStatus()` Returns the Person's disease status as an integer.
    `java.lang.String` | `getPatientType()` Returns the patient type as a string.
    `boolean` | `getPCPTreatmentCompliance()` Returns whether the Person complied with the PCP treatment.
    `java.lang.String` | `getPCPTreatmentRecommendation()` Returns the treatment recommendation the Person received from a PCP.
    `boolean` | `getPCPTreatmentRequested()` Returns whether the Person requested a treatment from a PCP.
    `java.lang.String` | `getPersonGoal1()` Returns the Person's first goal as a string.
    `java.lang.String` | `getPersonGoal2()` Returns the Person's second goal as a string.
    `java.lang.String` | `getPersonGoal3()` Returns the Person's third goal as a string.
    `java.util.ArrayList<Goal>` | `getPersonGoals()`
    `int` | `getPersonIDNumber()` Returns the Person's identification number as an integer.
    `java.lang.String` | `getPersonIDString()` Returns the Person's identification number as a string.
    `AgentID` | `getPreviousPeriodPCP()` Returns the Person's PCP for the previous period.
    `boolean` | `getSpecialistTreatmentCompliance()` Returns whether the Person complied with the Specialist treatment.
    `java.lang.String` | `getSpecialistTreatmentRecommendation()` Returns the treatment recommendation the Person received from a Specialist.
    `boolean` | `getSpecialistTreatmentRequested()` Returns whether the Person requested a treatment from a Specialist.
    `void` | `i1_GetPCPTreatmentRecommendation()` Get PCP treatment recommendation.
    `void` | `i1_GetSpecialistTreatmentRecommendation()` Get PCP treatment recommendation.
    `void` | `init_AssignInitialPCP()` Determines the Person's initial PCP.
    `void` | `init_InitializeVariables_BOY()` Initializes variables at the beginning of each simulation period.
    `void` | `init_InitializeVariables_Constructor()` Initializes variables (used in the constructor)
    `void` | `p1_SelectPCP()` Select a PCP.
    `void` | `p2_RequestPCPTreatment()` Requests a treatment from a PCP if the Person has a disease.
    `void` | `p3_RequestSpecialistTreatment()` Requests a treatment from a Specialist if the Person receives a referral.
    `void` | `p4_ComplyWithPCPTreatmentRecommendation()` The Person responds to the treatment recommendation received from a PCP.
    `void` | `p5_ComplyWithSpecialistTreatmentRecommendation()` The Person responds to the treatment recommendation received from a Specialist.
    `void` | `p6_UpdateDiseaseStatus()` Updates the Person's disease status based on the treatment received.
    `void` | `p7_ContractNewDisease()` Updates the Person's disease status.
    `boolean` | `r10_CheckForAppropriateTreatment()`
    `boolean` | `r11_CheckForReferral()`
    `boolean` | `r12_CheckNetworkParticipation(AgentID pPhysicianID)`
    `AgentID` | `r4_GetNearestPCP()`
    `AgentID` | `r5_GetFavoredPCP()`
    `boolean` | `r9_DetermineTreatmentPainLevel()`

    - ### Methods inherited from class agents.Agent

      `getAgentFirstPriorityGoalDescription, getAgentID, getAgentSecondPriorityGoalDescription, getAgentXLocation, getAgentYLocation, setAgentFirstPriorityGoalDescription, setAgentID, setAgentSecondPriorityGoalDescription, setAgentXLocation, setAgentYLocation`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Person

          public Person(repast.simphony.context.Context<java.lang.Object> pContext,
                AgentID pPersonID)

      Constructs a Person agent. The constructor sets the Person's attribute variables based on input parameters. It also initializes the variable "treatmentRequested" to false, and the variable "treatmentRecommendtionReceived" to none (so that an agent probed at the start of the simulation will show appropriate information.
      Parameters:
        `pSpace` - The identifier for the "space" simulation environment.
        `pPersonID` - The Person's identifier.

  - ### Method Detail

    - #### init_InitializeVariables_Constructor

          public void init_InitializeVariables_Constructor()

      Initializes variables (used in the constructor)

    - #### init_InitializeVariables_BOY

          public void init_InitializeVariables_BOY()

      Initializes variables at the beginning of each simulation period.

    - #### init_AssignInitialPCP

          public void init_AssignInitialPCP()

      Determines the Person's initial PCP. As the Person agent is constructed, this method determines the Person's initial PCP, based on PCP assignment parameters supplied by the model user.

    - #### i1_GetPCPTreatmentRecommendation

          public void i1_GetPCPTreatmentRecommendation()

      Get PCP treatment recommendation.

    - #### i1_GetSpecialistTreatmentRecommendation

          public void i1_GetSpecialistTreatmentRecommendation()

      Get PCP treatment recommendation.

    - #### p1_SelectPCP

          public void p1_SelectPCP()

      Select a PCP. Select a PCP.

    - #### p2_RequestPCPTreatment

          public void p2_RequestPCPTreatment()

      Requests a treatment from a PCP if the Person has a disease.

    - #### p3_RequestSpecialistTreatment

          public void p3_RequestSpecialistTreatment()

      Requests a treatment from a Specialist if the Person receives a referral.

    - #### p4_ComplyWithPCPTreatmentRecommendation

          public void p4_ComplyWithPCPTreatmentRecommendation()

      The Person responds to the treatment recommendation received from a PCP.

    - #### p5_ComplyWithSpecialistTreatmentRecommendation

          public void p5_ComplyWithSpecialistTreatmentRecommendation()

      The Person responds to the treatment recommendation received from a Specialist.

    - #### p6_UpdateDiseaseStatus

          public void p6_UpdateDiseaseStatus()

      Updates the Person's disease status based on the treatment received.

    - #### p7_ContractNewDisease

          public void p7_ContractNewDisease()

      Updates the Person's disease status. At the end of each period, this method updates the Person's disease status to either Disease 1 or Disease 2, based on incidence probability parameters supplied by the model user.

    - #### r4_GetNearestPCP

          public AgentID r4_GetNearestPCP()

    - #### r5_GetFavoredPCP

          public AgentID r5_GetFavoredPCP()

    - #### r9_DetermineTreatmentPainLevel

          public boolean r9_DetermineTreatmentPainLevel()

    - #### r10_CheckForAppropriateTreatment

          public boolean r10_CheckForAppropriateTreatment()

    - #### r11_CheckForReferral

          public boolean r11_CheckForReferral()

    - #### r12_CheckNetworkParticipation

          public boolean r12_CheckNetworkParticipation(AgentID pPhysicianID)

    - #### getPersonIDString

          public java.lang.String getPersonIDString()

      Returns the Person's identification number as a string.
      Returns:
        the Person's identification number as a string.

    - #### getCurrentPCPString

          public java.lang.String getCurrentPCPString()

      Returns the identification number of the current PCP as a string.
      Returns:
        the identification number of the current PCP as a string.

    - #### getIntegerCurrentDiseaseStatus

          public int getIntegerCurrentDiseaseStatus()

      Returns the Person's disease status as an integer.
      Returns:
        the Person's disease status as an integer.

    - #### getPersonIDNumber

          public int getPersonIDNumber()

      Returns the Person's identification number as an integer.
      Returns:
        the Person's identification number as an integer.

    - #### getPersonGoal1

          public java.lang.String getPersonGoal1()

      Returns the Person's first goal as a string.
      Returns:
        A string with the Person's first goal.

    - #### getPersonGoal2

          public java.lang.String getPersonGoal2()

      Returns the Person's second goal as a string.
      Returns:
        A string with the Person's second goal

    - #### getPersonGoal3

          public java.lang.String getPersonGoal3()

      Returns the Person's third goal as a string.
      Returns:
        A string with the Person's third goal

    - #### chart_GetDisease1Count

          public int chart_GetDisease1Count()

      Counts the number of Persons with Disease 1. This method is used to generate the simulation's "Disease prevalence" graph.
      Returns:
        1 if the Person has Disease 1, and 0 otherwise.

    - #### chart_GetDisease2Count

          public int chart_GetDisease2Count()

      Counts the number of Persons with Disease 2. This method is used to generate the simulation's "Disease prevalence" graph.
      Returns:
        1 if the Person has Disease 2, and 0 otherwise.

    - #### chart_GetDiseaseStatus

          public int chart_GetDiseaseStatus()

      Provides the Person's health status as an integer (0, 1, or 2). This method is used to generate the simulation's "Health status" graph.
      Returns:
        0 if the Person has no disease, 1 if the Person has Disease 1, and 2 if the Person has Disease 2.

    - #### chart_GetPCPTreatmentRequestedCount

          public int chart_GetPCPTreatmentRequestedCount()

      Counts the number of Persons who requested a PCP treatment. This method is used to generate the simulation's "Number of patient visits" graph.
      Returns:
        1 if the Person requested a PCP treatment and 0 otherwise.

    - #### chart_GetSpecialistTreatmentRequestedCount

          public int chart_GetSpecialistTreatmentRequestedCount()

      Counts the number of Persons who requested a Specialist treatment. This method is used to generate the simulation's "Number of patient visits" graph.
      Returns:
        1 if the Person requested a Specialist treatment and 0 otherwise.

    - #### chart_GetProperlyTreatedPatientTypeCount

          public int chart_GetProperlyTreatedPatientTypeCount()

      Counts the number of "properly treated" patients. This method is used to generate the simulation's "Patient type" graph.
      Returns:
        1 if the Person is properly treated, and 0 otherwise.

    - #### chart_GetImproperlyTreatedPatientTypeCount

          public int chart_GetImproperlyTreatedPatientTypeCount()

      Counts the number of "improperly treated" patients. This method is used to generate the simulation's "Patient type" graph.
      Returns:
        1 if the Person is improperly treated, and 0 otherwise.

    - #### chart_GetNoncompliantPatientTypeCount

          public int chart_GetNoncompliantPatientTypeCount()

      Counts the number of "noncompliant" patients. This method is used to generate the simulation's "Patient type" graph.
      Returns:
        1 if the Person is noncompliant, and 0 otherwise.

    - #### chart_GetUntreatedPatientTypeCount

          public int chart_GetUntreatedPatientTypeCount()

      Counts the number of "untreated" patients. This method is used to generate the simulation's "Patient type" graph.
      Returns:
        1 if the Person is untreated, and 0 otherwise.

    - #### chart_GetNonrequestingPatientTypeCount

          public int chart_GetNonrequestingPatientTypeCount()

      Counts the number of "non-requesting" patients. This method is used to generate the simulation's "Patient type" graph.
      Returns:
        1 if the Person did not request a treatment, and 0 otherwise.

    - #### getCurrentPCP

          public AgentID getCurrentPCP()

      Returns the Person's current PCP.
      Returns:
        AgentID currentPCP.

    - #### getPreviousPeriodPCP

          public AgentID getPreviousPeriodPCP()

      Returns the Person's PCP for the previous period.
      Returns:
        AgentID previous period PCP

    - #### getCurrentDiseaseStatus

          public Constants.Disease getCurrentDiseaseStatus()

      Returns the Person's current disease status.
      Returns:
        the Person's current disease status.

    - #### getDiseaseStatusHistory

          public java.util.ArrayList<AnnualDiseaseStatus> getDiseaseStatusHistory()

      Returns the Person's current disease status.
      Returns:
        the Person's current disease status.

    - #### getPCPTreatmentRequested

          public boolean getPCPTreatmentRequested()

      Returns whether the Person requested a treatment from a PCP.
      Returns:
        Whether the Person's requested a treatment from a PCP.

    - #### getSpecialistTreatmentRequested

          public boolean getSpecialistTreatmentRequested()

      Returns whether the Person requested a treatment from a Specialist.
      Returns:
        Whether the Person's requested a treatment from a Specialist.

    - #### getPCPTreatmentRecommendation

          public java.lang.String getPCPTreatmentRecommendation()

      Returns the treatment recommendation the Person received from a PCP.
      Returns:
        the treatment recommendation the Person received from a PCP.

    - #### getSpecialistTreatmentRecommendation

          public java.lang.String getSpecialistTreatmentRecommendation()

      Returns the treatment recommendation the Person received from a Specialist.
      Returns:
        the treatment recommendation the Person received from a Specialist.

    - #### getPCPTreatmentCompliance

          public boolean getPCPTreatmentCompliance()

      Returns whether the Person complied with the PCP treatment.
      Returns:
        whether the Person complied with the PCP treatment.

    - #### getSpecialistTreatmentCompliance

          public boolean getSpecialistTreatmentCompliance()

      Returns whether the Person complied with the Specialist treatment.
      Returns:
        whether the Person complied with the Specialist treatment.

    - #### getPatientType

          public java.lang.String getPatientType()

      Returns the patient type as a string.
      Returns:
        the patient type.

    - #### getPersonGoals

          public java.util.ArrayList<Goal> getPersonGoals()