Documentation
¶
Index ¶
- type EncounterEventConfig
- type EventCode
- type Huddle
- func (h *Huddle) ActiveDateTime() *models.FHIRDateTime
- func (h *Huddle) AddHuddleMemberDueToRecentEvent(patientID string, code EventCode)
- func (h *Huddle) AddHuddleMemberDueToRiskScore(patientID string)
- func (h *Huddle) AddHuddleMemberDueToRollOver(patientID string, from time.Time, previousReason *models.CodeableConcept)
- func (h *Huddle) FindHuddleMember(patientID string) *HuddleMember
- func (h *Huddle) HuddleMembers() []HuddleMember
- func (h *Huddle) IsHuddle() bool
- func (h *Huddle) Leader() *models.Reference
- func (h *Huddle) RemoveHuddleMember(patientID string) *HuddleMember
- type HuddleConfig
- type HuddleMember
- func (h *HuddleMember) ID() string
- func (h *HuddleMember) Reason() *models.CodeableConcept
- func (h *HuddleMember) ReasonIsManuallyAdded() bool
- func (h *HuddleMember) ReasonIsRecentEncounter() bool
- func (h *HuddleMember) ReasonIsRiskScore() bool
- func (h *HuddleMember) ReasonIsRollOver() bool
- func (h *HuddleMember) Reviewed() *models.FHIRDateTime
- type HuddleScheduler
- type HuddleSchedulerController
- type RiskScoreFrequencyConfig
- type ScheduleByEventConfig
- type ScheduleByRiskConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EncounterEventConfig ¶
EncounterEventConfig represents what types of encounters should cause patients to be scheduled, and how far back the algorithm should look for them
type EventCode ¶
EventCode represents a coded event that should cause a patient to be scheduled. The Name will be displayed as part of the reason the patient was scheduled. If UseEndDate is set to true, then the end date, rather than the start date, will be used in the scheduling algorithm.
type Huddle ¶
Huddle provides convenient functions on a Group to get access to extended huddle data fields
func (*Huddle) ActiveDateTime ¶
func (h *Huddle) ActiveDateTime() *models.FHIRDateTime
ActiveDateTime returns the huddle's active datetime (or nil if there is not one)
func (*Huddle) AddHuddleMemberDueToRecentEvent ¶
AddHuddleMemberDueToRecentEvent adds the patient to the huddle using RECENT_ENCOUNTER event code as the reason. If the patient is already in the huddle, nothing will be updated.
func (*Huddle) AddHuddleMemberDueToRiskScore ¶
AddHuddleMemberDueToRiskScore adds the patient to the huddle using RISK_SCORE as the reason. If the patient is already in the huddle, nothing will be updated.
func (*Huddle) AddHuddleMemberDueToRollOver ¶
func (h *Huddle) AddHuddleMemberDueToRollOver(patientID string, from time.Time, previousReason *models.CodeableConcept)
AddHuddleMemberDueToRollOver adds the patient to the huddle using the ROLLOVER and previous reason. If the patient is already in the huddle, nothing will be updated.
func (*Huddle) FindHuddleMember ¶
func (h *Huddle) FindHuddleMember(patientID string) *HuddleMember
FindHuddleMember returns the huddle member with the specified ID (or nil if the patient is not in the huddle)
func (*Huddle) HuddleMembers ¶
func (h *Huddle) HuddleMembers() []HuddleMember
HuddleMembers returns a slice of HuddleMembers associated to this huddle
func (*Huddle) RemoveHuddleMember ¶
func (h *Huddle) RemoveHuddleMember(patientID string) *HuddleMember
RemoveHuddleMember removes the requested huddle member and returns the removed member. If no matching member is found, it returns nil.
type HuddleConfig ¶
type HuddleConfig struct { Name string LeaderID string Days []time.Weekday LookAhead int RiskConfig *ScheduleByRiskConfig EventConfig *ScheduleByEventConfig RollOverDelayInDays int SchedulerCronSpec string }
HuddleConfig represents a configuration for how huddles should be automatically populated. The LeaderID is expected to correspond to a Practitioner. Days refers to the days of the week on which the huddle meets. LookAhead determines how many huddles should be scheduled into the future. The further out, the more time it takes to plan them and the less certain they are (since any changes ripple out into the future). RiskConfig specifies how risk scores are converted to huddle frequencies. RollOverDelayInDays indicates when patients should be rolled over to the next huddle if they weren't discussed. 1 means they will be rolled over to the next huddle the day after their original huddle (2 means they will be rolled over 2 days after their huddle). If RollOverDelayInDays isn't specified in the config, or is less than 1, patients are never rolled over to the next huddle. SchedulerCronSpec indicates when the auto scheduler should be run (for example, nightly) and follows the cron expression format defined/ by https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format. If SchedulerCronSpec is less frequent than daily, RollOverDelayInDays may not work correctly.
func (*HuddleConfig) FindRiskScoreFrequencyConfigByScore ¶
func (hc *HuddleConfig) FindRiskScoreFrequencyConfigByScore(score float64) *RiskScoreFrequencyConfig
FindRiskScoreFrequencyConfigByScore finds the proper risk config for a given score
func (*HuddleConfig) IsHuddleDay ¶
func (hc *HuddleConfig) IsHuddleDay(date time.Time) bool
IsHuddleDay returns true if the passed in date occurs on one of configured huddle weekdays.
type HuddleMember ¶
type HuddleMember models.GroupMemberComponent
HuddleMember provides convenient functions on a GroupMemberComponent to get access to extended huddle data fields
func (*HuddleMember) Reason ¶
func (h *HuddleMember) Reason() *models.CodeableConcept
Reason returns the reason the member was added to the huddle (or nil if the reason isn't set)
func (*HuddleMember) ReasonIsManuallyAdded ¶
func (h *HuddleMember) ReasonIsManuallyAdded() bool
ReasonIsManuallyAdded indicates if the member reason is due to the patient being manually added to the huddle
func (*HuddleMember) ReasonIsRecentEncounter ¶
func (h *HuddleMember) ReasonIsRecentEncounter() bool
ReasonIsRecentEncounter indicates if the member reason is due to a recent significant encounter
func (*HuddleMember) ReasonIsRiskScore ¶
func (h *HuddleMember) ReasonIsRiskScore() bool
ReasonIsRiskScore indicates if the member reason is due to the patient's current risk score
func (*HuddleMember) ReasonIsRollOver ¶
func (h *HuddleMember) ReasonIsRollOver() bool
ReasonIsRollOver indicates if the member reason is due to roll over from a previous huddle
func (*HuddleMember) Reviewed ¶
func (h *HuddleMember) Reviewed() *models.FHIRDateTime
Reviewed returns the date that the member was reviewed for this huddle (or nil if they haven't been reviewed)
type HuddleScheduler ¶
type HuddleScheduler struct { Config *HuddleConfig Huddles []*Huddle // contains filtered or unexported fields }
HuddleScheduler schedules huddles based on the passed in config.
func NewHuddleScheduler ¶
func NewHuddleScheduler(config *HuddleConfig) *HuddleScheduler
NewHuddleScheduler initializes a new huddle scheduler based on the passed in config.
func (*HuddleScheduler) ScheduleHuddles ¶
func (hs *HuddleScheduler) ScheduleHuddles() ([]*Huddle, error)
ScheduleHuddles schedules huddles based on the passed in config. It will schedule out the number of huddles as specified in the config.LookAhead.
type HuddleSchedulerController ¶
type HuddleSchedulerController struct {
// contains filtered or unexported fields
}
func (*HuddleSchedulerController) AddConfig ¶
func (h *HuddleSchedulerController) AddConfig(config *HuddleConfig)
func (*HuddleSchedulerController) ScheduleHandler ¶
func (h *HuddleSchedulerController) ScheduleHandler(c *gin.Context)
type RiskScoreFrequencyConfig ¶
type RiskScoreFrequencyConfig struct { MinScore float64 MaxScore float64 IdealFrequency int MinFrequency int MaxFrequency int }
RiskScoreFrequencyConfig represents the relationship between risk scores and frequency of huddle discussion
type ScheduleByEventConfig ¶
type ScheduleByEventConfig struct {
EncounterConfigs []EncounterEventConfig
}
ScheduleByEventConfig represents how recent events should influence huddle population
type ScheduleByRiskConfig ¶
type ScheduleByRiskConfig struct { RiskMethod models.Coding FrequencyConfigs []RiskScoreFrequencyConfig }
ScheduleByRiskConfig represents how a risk assessment should influence huddle population