modeling

package
v0.0.0-...-e9a30e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	City           string   `yaml:"city,omitempty"`
	State          string   `yaml:"state,omitempty"`
	Street         []string `yaml:"street,omitempty"`
	BuildingNumber string   `yaml:"building_number,omitempty"`
	PostalCode     string   `yaml:"postal_code,omitempty"`
}

type AddressTemplate

type AddressTemplate struct {
	City                string  `yaml:"city"`
	State               string  `yaml:"state"`
	PostalMask          string  `yaml:"postal_mask"`
	StreetRange         string  `yaml:"street_range"`
	BuildingNumberRange string  `yaml:"building_number_range"`
	AptPercentage       float32 `yaml:"apt_percentage"`
}

type Addresses

type Addresses struct {
	Residential []AddressTemplate
	Commercial  []AddressTemplate
}

func (*Addresses) RandCommercial

func (addr *Addresses) RandCommercial() Address

func (*Addresses) RandResidential

func (addr *Addresses) RandResidential() Address

functions for generating addresses

type Condition

type Condition struct {
	Name string `yaml:"name"`
	Code struct {
		System string `yaml:"system"`
		Value  string `yaml:"value"`
	}
	OnsetAge int  `yaml:"onset_age"`
	Terminal bool `yaml:"terminal"`
}

type Diagnosis

type Diagnosis struct {
	Name string `yaml:"name"`
	Code struct {
		System string `yaml:"system"`
		Value  string `yaml:"value"`
	}
	Commonality     float32  `yaml:"commonality"`
	OnsetAges       []string `yaml:"onset_ages,omitempty"`
	Mortality       float32  `yaml:"mortality"`
	MortalityWindow string   `yaml:"mortality_window"`
	Nature          string   `yaml:"nature"`
}

func (*Diagnosis) Manifest

func (diag *Diagnosis) Manifest(population []Person) int

type Distributions

type Distributions struct {
	Race           map[string]float32 `yaml:"race"`
	Ethnicity      map[string]float32 `yaml:"ethnicity"`
	Sexuality      map[string]float32 `yaml:"sexuality"`
	GenderIdentity map[string]float32 `yaml:"gender_identity"`
	Ages           map[string]float32 `yaml:"ages"`
}

func (*Distributions) RandAge

func (dist *Distributions) RandAge() int

func (*Distributions) RandEthnicity

func (dist *Distributions) RandEthnicity() string

func (*Distributions) RandGender

func (dist *Distributions) RandGender() string

func (*Distributions) RandRace

func (dist *Distributions) RandRace() string

functions for generating demographic data

func (*Distributions) RandSexuality

func (dist *Distributions) RandSexuality() string

type Identifier

type Identifier struct {
	Mask string `yaml:"mask"`
	Type string `yaml:"type"`
}

type Name

type Name struct {
	Given  []string `yaml:"given,omitempty"`
	Family string   `yaml:"family,omitempty"`
}

type Names

type Names struct {
	Masculine []Name `yaml:"masculine"`
	Feminine  []Name `yaml:"feminine"`
}

func (*Names) RandFeminine

func (name *Names) RandFeminine() Name

func (*Names) RandMasculine

func (name *Names) RandMasculine() Name

functions for generating names

type Person

type Person struct {
	Identifier []config.Code `yaml:"identifier,omitempty"`
	Name       Name          `yaml:"name,omitempty"`
	Birthdate  string        `yaml:"birthdate,omitempty"`
	DeathDate  string        `yaml:"death_date,omitempty"`
	Gender     string        `yaml:"gender,omitempty"`
	Address    struct {
		Primary   Address `yaml:"primary,omitempty"`
		Temporary Address `yaml:"temporary,omitempty"`
	}
	Details    map[string]string `yaml:"details,omitempty"`
	Conditions []Condition       `yaml:"conditions,omitempty"`
}

func (*Person) Age

func (person *Person) Age() int

func (*Person) AgeAt

func (person *Person) AgeAt(date string) int

func (*Person) ConditionsBetween

func (person *Person) ConditionsBetween(start string, end string) []*Condition

type PopStats

type PopStats struct {
	Inherit       []string      `yaml:"inherit"`
	Rules         Rules         `yaml:"rules"`
	Identifiers   []Identifier  `yaml:"identifiers"`
	Distributions Distributions `yaml:"distributions"`
	Names         Names         `yaml:"names"`
	Addresses     Addresses     `yaml:"addresses"`
	Diagnoses     []Diagnosis   `yaml:"diagnoses"`
}

func (*PopStats) NewPatient

func (stats *PopStats) NewPatient() Person

type Rules

type Rules struct {
	Counts struct {
		Patients  int `yaml:"patients"`
		Providers int `yaml:"providers"`
	}
	Output string `yaml:"output"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL