Package io.github.ai4ci.abm
Interface PersonHistory
- All Superinterfaces:
Abstraction.TemporalState<Person>
,PersonTemporalState
,Serializable
- All Known Implementing Classes:
ImmutablePersonHistory
Historical patient data relevant to the ongoing simulation. Some of this is copied
from the patients state, and some is updated by patient behaviour. Notably
this is where contacts, and testing is stored as the history of both are
needed. The simulation stores enough history for an individual to inform the
current state (in terms of
-
Method Summary
Modifier and TypeMethodDescriptiongetHistoricalContacts
(int limit) default Stream<TestResult>
getHistoricalTests
(int limit) default Optional<PersonHistory>
Deprecated.Deprecated.default Optional<PersonHistory>
Deprecated.default Optional<PersonHistory>
Find the infectee's state at the start of last episode of exposure to virus, I.e. the first in a run of exposures, which are separated by less that one infectious period.default int
The maximum delay for test results for this individual is used when we assemble the forward looking list of test results on a per day basis.default Optional<PersonHistory>
Deprecated.default Optional<PersonHistory>
getNext()
default Optional<PersonHistory>
default Stream<PersonHistory>
getPrevious
(int limit) default List<TestResult>
The collection of possibly still relevant test results for an individual that generate a result on this day, regardless of when they were taken.default List<List<TestResult>>
The list of tests taken on this day, indexed by the delay until the results are available.default Stream<TestResult>
getResultsBySampleDate
(int time) All the contacts in the last presumed infectious perioddefault Stream<TestResult>
All the tests done in the last presumed infectious periodContact[]
A list of contacts made in this time period and their weight from the perspective of transmission (i.e. context).Exposure[]
A list of exposures made in this time period.The list of tests taken on this day.default boolean
Is this person newly exposed on this day?default boolean
Is this person newly needing hospitalisation on this day, or is this part of the same infection episode (as defined by the average duration of symptoms.default boolean
Is this person newly infectious on this day.Methods inherited from interface io.github.ai4ci.abm.mechanics.Abstraction.TemporalState
getEntity, getExperimentName, getExperimentReplica, getModelName, getModelReplica, getTime, getUrn
Methods inherited from interface io.github.ai4ci.abm.PersonTemporalState
getContactExposure, getNormalisedSeverity, getNormalisedViralLoad, getPresumedLocalPrevalence, incubPeriod, infPeriod, isDead, isInfectious, isReportedSymptomatic, isRequiringHospitalisation, isSymptomatic
-
Method Details
-
getTodaysTests
List<TestResult> getTodaysTests()The list of tests taken on this day. Initially the result will be marked as PENDING until the test is processed. (the true result is available internally to the model immediately, but not necessarily observed). -
getTodaysContacts
Contact[] getTodaysContacts()A list of contacts made in this time period and their weight from the perspective of transmission (i.e. context). Weights might be less if for example the participants are wearing masks. In the future we might build contact venue into this context.- Returns:
-
getTodaysExposures
Exposure[] getTodaysExposures()A list of exposures made in this time period. These are contacts who are infectious. -
getPrevious
-
getNext
-
getPrevious
-
getInfector
Deprecated.For a new infection this finds the contact with maximal viral exposure on the first day before the subject is infectious when the subject was exposed by an "infector". From this "infector" the time of their infection is identified so that all the infections from one infector should map back to the same instant in time for that infector.- Returns:
-
getInfectiousContact
Deprecated.For a new infection this finds the contact with maximal viral exposure on the first day before the subject is infectious when the subject was exposed by an "infector". From this "infector" the time of their infection is identified so that all the infections from one infector should map back to the same instant in time for that infector.- Returns:
-
getInfectionStart
Deprecated.If person is infected here find the infectee state at the point in time they became infectious. -
getNewInfection
Deprecated.Find if a person is newly infectious on this day. This is not the same as being newly exposed.- Returns:
-
isIncidentExposure
@Lazy default boolean isIncidentExposure()Is this person newly exposed on this day? defined as the first time a non zero exposure is recorded within one infectious period.- Returns:
-
isIncidentInfection
@Lazy default boolean isIncidentInfection()Is this person newly infectious on this day.- Returns:
-
isIncidentHospitalisation
@Lazy default boolean isIncidentHospitalisation()Is this person newly needing hospitalisation on this day, or is this part of the same infection episode (as defined by the average duration of symptoms.- Returns:
-
getLastExposure
Find the infectee's state at the start of last episode of exposure to virus, I.e. the first in a run of exposures, which are separated by less that one infectious period. -
getHistoricalTests
-
getStillRelevantTests
All the tests done in the last presumed infectious period -
getResults
The collection of possibly still relevant test results for an individual that generate a result on this day, regardless of when they were taken. This does look backwards over all possibly relevant tests, there is possibility that some tests that take a very long time to process compared to the infectious period will not get picked up by this logic and we may have to revisit -
getHistoricalContacts
-
getStillRelevantContacts
All the contacts in the last presumed infectious period -
getResultsBySampleDate
-
getMaxDelay
@Derived default int getMaxDelay()The maximum delay for test results for this individual is used when we assemble the forward looking list of test results on a per day basis. i.e. the list of results organised by sample date as they would appear on the release date, including delay distribution. -
getResultsBySampleDate
The list of tests taken on this day, indexed by the delay until the results are available.
-