Documentation ¶
Index ¶
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func GenerateAddress() models.Address
- func GenerateBP(ctx Context) []models.Observation
- func GenerateBloodSugars(ctx Context) []models.Observation
- func GenerateCholesterol(ctx Context) []models.Observation
- func GenerateConditions(ctx Context, md []ConditionMetadata) []models.Condition
- func GenerateDemographics() models.Patient
- func GenerateMedication(medicationID int, onset *models.FHIRDateTime, abatement *models.FHIRDateTime, ...) *models.MedicationStatement
- func GeneratePatient() []interface{}
- func GenerateQuantity(min, max int) *models.Quantity
- func GenerateWeightAndHeight(ctx Context) []models.Observation
- func MustAsset(name string) []byte
- func RandomBirthDate() time.Time
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type ConditionMetadata
- type Context
- type MedicationMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func GenerateAddress ¶
func GenerateBP ¶
func GenerateBP(ctx Context) []models.Observation
func GenerateBloodSugars ¶
func GenerateBloodSugars(ctx Context) []models.Observation
func GenerateCholesterol ¶
func GenerateCholesterol(ctx Context) []models.Observation
func GenerateConditions ¶
func GenerateConditions(ctx Context, md []ConditionMetadata) []models.Condition
func GenerateDemographics ¶
func GenerateMedication ¶
func GenerateMedication(medicationID int, onset *models.FHIRDateTime, abatement *models.FHIRDateTime, mmd []MedicationMetadata) *models.MedicationStatement
func GeneratePatient ¶
func GeneratePatient() []interface{}
func GenerateQuantity ¶
func GenerateWeightAndHeight ¶
func GenerateWeightAndHeight(ctx Context) []models.Observation
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func RandomBirthDate ¶
RandomBirthDate generates a random birth date between 65 and 85 years ago
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type ConditionMetadata ¶
type ConditionMetadata struct { ID int `json:"condition_id"` ICD9 string `json:"icd9code"` Display string `json:"display"` MedicationID int `json:"medication_id"` Overnights string `json:"overnights"` AbatementChance int `json:"abatementChance"` Fatal bool `json:"healOrDeath"` MortalityChance int `json:"mortalityChance"` MortalityTime string `json:"mortalityTime"` RecoveryEstimate string `json:"recoveryEstimate"` ProcedureChance int `json:"procedureChance"` ProcedureSuccess int `json:"procedureSuccess"` CheckUp string `json:"checkUp"` ProcedureDescription string `json:"procedureDescription"` ProcedureCode string `json:"procedureCode"` ProcedureName string `json:"procedureCodeName"` }
func LoadConditions ¶
func LoadConditions() []ConditionMetadata
type Context ¶
type Context struct { Smoker string Hypertention string Alcohol string Cholesterol string Diabetes string Height int Weight int BirthDate time.Time }
Context contains information about the patient that can be used when generating information
func NewContext ¶
func NewContext() Context
NewContext generates a new context with randomly populated content
type MedicationMetadata ¶
type MedicationMetadata struct { ID int `json:"medication_id"` RxNormCode string `json:"rxNormCode"` BrandName string `json:"brandName"` TradeName string `json:"tradeName"` }
func LoadMedications ¶
func LoadMedications() []MedicationMetadata