models

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CarePlanActivity

type CarePlanActivity map[string][]CarePlanRule

CarePlanActivity object

type CarePlanCondition

type CarePlanCondition map[string][]string

CarePlanCondition object

type CarePlanConditionMapping

type CarePlanConditionMapping struct {
	CarePlanConditions []CarePlanCondition `json:"conditions"`
	CarePlanGoals      []CarePlanGoal      `json:"goals"`
	CarePlanActivities []CarePlanActivity  `json:"activities"`
}

CarePlanConditionMapping object

type CarePlanConditionsMapping

type CarePlanConditionsMapping struct {
	CarePlanConditionMeta    interface{}                `json:"meta"`
	CarePlanConditionMapping []CarePlanConditionMapping `json:"mappings"`
}

CarePlanConditionsMapping object

type CarePlanContentActivities

type CarePlanContentActivities map[string]CarePlanContentActivity

CarePlanContentActivities object

type CarePlanContentActivity

type CarePlanContentActivity map[string]interface{}

CarePlanContentActivity object

type CarePlanContentGoal

type CarePlanContentGoal map[string]interface{}

CarePlanContentGoal object

type CarePlanContentGoals

type CarePlanContentGoals map[string]CarePlanContentGoal

CarePlanContentGoals object

type CarePlanContentMapping

type CarePlanContentMapping struct {
	Meta                    interface{}               `json:"meta"`
	CarePlanContentGoals    CarePlanContentGoals      `json:"goals"`
	CarePlanContentActivity CarePlanContentActivities `json:"activities"`
}

CarePlanContentMapping object

type CarePlanGoal

type CarePlanGoal string

CarePlanGoal object

type CarePlanOutput

type CarePlanOutput struct {
	CarePlanOutputGoals      []CarePlanContentGoal     `json:"goals"`
	CarePlanOutputActivities []CarePlanContentActivity `json:"activities"`
}

CarePlanOutput object

type CarePlanRule

type CarePlanRule map[string]string

CarePlanRule object

type CustomValidator

type CustomValidator struct {
	Validator *validator.Validate
}

CustomValidator type

func (*CustomValidator) Validate

func (cv *CustomValidator) Validate(i interface{}) error

Validate interface

type Meta

type Meta struct {
	AlgorithmName    string    `json:"algorithm"`
	RequestID        uuid.UUID `json:"request_id"`
	APIVersion       string    `json:"api_version"`
	Debug            bool      `json:"debug,omitempty"`
	CarePlan         bool      `json:"careplan,omitempty"`
	RiskModel        string    `json:"risk_model,omitempty"`
	RiskModelVersion string    `json:"risk_model_version,omitempty"`
	LabBased         bool      `json:"lab_based"`
	Comments         []string  `json:"comments"`
}

Meta object

type OHARequest

type OHARequest struct {
	Config *ORConfig `json:"config" validate:"required"`
	Params *ORParams `json:"params" validate:"required"`
}

OHARequest object

type ORAge

type ORAge struct {
	Value *int64  `json:"value" validate:"required"`
	Unit  *string `json:"unit" validate:"required"`
}

ORAge object

type ORBiologicalSample

type ORBiologicalSample struct {
	EffectiveDate *string      `json:"effectiveDate" validate:"required"`
	Name          *string      `json:"name" validate:"required"`
	Category      *string      `json:"category" validate:"required"`
	Value         *interface{} `json:"value" validate:"required"`
	Units         *string      `json:"units" validate:"required"`
	Type          *string      `json:"type" validate:""`
}

ORBiologicalSample object

type ORBodyMeasurement

type ORBodyMeasurement struct {
	EffectiveDate *string      `json:"effectiveDate" validate:"required"`
	Name          *string      `json:"name" validate:"required"`
	Category      *string      `json:"category" validate:"required"`
	Value         *interface{} `json:"value" validate:"required"`
	Units         *string      `json:"units" validate:"required"`
	Arm           *string      `json:"arm" validate:""`
}

ORBodyMeasurement object

type ORConfig

type ORConfig struct {
	Algorithm        *string `json:"algorithm" validate:"required"`
	RiskModel        *string `json:"risk_model" validate:"required"`
	Debug            *bool   `json:"debug" validate:""`
	CarePlan         *bool   `json:"careplan" validate:""`
	RiskModelVersion *string `json:"risk_model_version" validate:""`
	LabBased         *bool   `json:"lab_based" validate:""`
}

ORConfig object

type ORDemographics

type ORDemographics struct {
	Gender            *string `json:"gender" validate:"required"`
	Age               *ORAge  `json:"age" validate:"required"`
	BirthCountry      *string `json:"birth_country" validate:""`
	BirthCountryCode  *string `json:"birth_country_code" validate:"required"`
	LivingCountry     *string `json:"living_country" validate:""`
	LivingCountryCode *string `json:"living_country_code" validate:""`
	Race              *string `json:"race" validate:""`
	Ethnicity         *string `json:"ethnicity" validate:""`
}

ORDemographics object

type ORFamilyHistory

type ORFamilyHistory struct {
	Name     *string `json:"name" validate:"required"`
	Relative *string `json:"relative" validate:"required"`
}

ORFamilyHistory object

type ORLifestyle

type ORLifestyle struct {
	Name           *string      `json:"name" validate:"required"`
	Category       *string      `json:"category" validate:"required"`
	Value          *interface{} `json:"value" validate:"required"`
	Units          *string      `json:"units" validate:""`
	Frequency      *string      `json:"frequency" validate:""`
	Intensity      *string      `json:"intensity" validate:""`
	QuitWithinYear *bool        `json:"quit_within_year" validate:""`
}

ORLifestyle object

type ORMedicalHistory

type ORMedicalHistory struct {
	Name        *string `json:"name" validate:""`
	Category    *string `json:"category" validate:"required"`
	IsActive    *bool   `json:"is_active" validate:""`
	Type        *string `json:"type" validate:""`
	Allergen    *string `json:"allergen" validate:""`
	Criticality *string `json:"criticality" validate:""`
	Reaction    *string `json:"reaction" validate:""`
}

ORMedicalHistory object

type ORMedication

type ORMedication struct {
	Generic   *string `json:"generic" validate:""`
	Category  *string `json:"category" validate:"required"`
	Class     *string `json:"class" validate:"required"`
	Status    *string `json:"status" validate:""`
	Dose      *string `json:"dose" validate:""`
	Frequency *string `json:"frequency" validate:""`
}

ORMedication object

type ORParamComponents

type ORParamComponents struct {
	Lifestyle         []ORLifestyle        `json:"lifestyle" validate:"required"`
	BodyMeasurements  []ORBodyMeasurement  `json:"body-measurements" validate:"required"`
	BiologicalSamples []ORBiologicalSample `json:"biological-samples" validate:"required"`
	MedicalHistory    []ORMedicalHistory   `json:"medical_history" validate:""`
	Medications       []ORMedication       `json:"medications" validate:""`
	FamilyHistory     []ORFamilyHistory    `json:"family_history" validate:""`
}

ORParamComponents object

type ORParams

type ORParams struct {
	Demographics *ORDemographics    `json:"demographics" validate:"required"`
	Components   *ORParamComponents `json:"components" validate:"required"`
}

ORParams object

type ORRAssessment

type ORRAssessment struct {
	Code    *string `json:"code" validate:"required"`
	Eval    *string `json:"eval" validate:"required"`
	Message *string `json:"message" validate:"required"`
	Refer   *string `json:"refer" validate:"required"`
	Target  *string `json:"target" validate:"required"`
	TFL     *string `json:"tfl" validate:"required"`
	Value   *string `json:"value" validate:"required"`
}

ORRAssessment object

type ORRAssessments

type ORRAssessments struct {
	BloodPressure   *ORRAssessment      `json:"blood_pressure"`
	BodyComposition *ORRBodyComposition `json:"body_composition"`
	Cholesterol     *ORRCholesterol     `json:"cholesterol"`
	CVD             *ORRAssessment      `json:"cvd"`
	Diabetes        *ORRAssessment      `json:"diabetes"`
	Lifestyle       *ORRLifestyle       `json:"lifestyle"`
}

ORRAssessments object

func NewORRAssessments

func NewORRAssessments() *ORRAssessments

NewORRAssessments function

type ORRBodyComposition

type ORRBodyComposition struct {
	Components *ORRBodyCompositionComponents `json:"components"`
	Message    *string                       `json:"message"`
}

ORRBodyComposition object

type ORRBodyCompositionComponents

type ORRBodyCompositionComponents struct {
	BMI       *ORRAssessment `json:"bmi"`
	BodyFat   *ORRAssessment `json:"body_fat"`
	WaistCirc *ORRAssessment `json:"waist_circ"`
	WHR       *ORRAssessment `json:"whr"`
}

ORRBodyCompositionComponents object

type ORRCholesterol

type ORRCholesterol struct {
	Components *ORRCholesterolComponents `json:"components"`
	Message    *string                   `json:"message"`
}

ORRCholesterol object

type ORRCholesterolComponents

type ORRCholesterolComponents struct {
	HDL   *ORRAssessment `json:"hdl"`
	LDL   *ORRAssessment `json:"ldl"`
	TG    *ORRAssessment `json:"tg"`
	TChol *ORRAssessment `json:"total_cholesterol"`
}

ORRCholesterolComponents object

type ORRDiet

type ORRDiet struct {
	Components *ORRDietComponents `json:"components"`
	Message    *string            `json:"message"`
}

ORRDiet object

type ORRDietComponents

type ORRDietComponents struct {
	Fruit          *ORRAssessment `json:"fruit"`
	FruitVegetable *ORRAssessment `json:"fruit_vegetable"`
	Vegetable      *ORRAssessment `json:"vegetable"`
}

ORRDietComponents object

type ORRGoal

type ORRGoal struct {
	Code    *string `json:"code" validate:"required"`
	Eval    *string `json:"eval" validate:"required"`
	TFL     *string `json:"tfl" validate:"required"`
	Message *string `json:"message" validate:"required"`
}

ORRGoal object

type ORRLifestyle

type ORRLifestyle struct {
	Components *ORRLifestyleComponents `json:"components"`
	Message    *string                 `json:"message"`
}

ORRLifestyle object

type ORRLifestyleComponents

type ORRLifestyleComponents struct {
	Alcohol          *ORRAssessment `json:"alcohol"`
	Diet             *ORRDiet       `json:"diet"`
	PhysicalActivity *ORRAssessment `json:"physical_activity"`
	Smoking          *ORRAssessment `json:"smoking"`
}

ORRLifestyleComponents object

type ORRReferralReason

type ORRReferralReason struct {
	Type   *string `json:"type" validate:"required"`
	Urgent *bool   `json:"urgent" validate:"required"`
}

ORRReferralReason object

type ORRReferrals

type ORRReferrals struct {
	Reasons []ORRReferralReason `json:"reasons" validate:""`
	Refer   *bool               `json:"refer" validate:""`
	Urgent  *bool               `json:"urgent" validate:""`
}

ORRReferrals object

func NewORRReferrals

func NewORRReferrals() *ORRReferrals

NewORRReferrals function

type Output

type Output struct {
	Errors      []OutputError          `json:"errors"`
	Meta        Meta                   `json:"meta"`
	Assessments *ORRAssessments        `json:"assessments"`
	Goals       []ORRGoal              `json:"goals"`
	Referrals   *ORRReferrals          `json:"referrals"`
	CarePlan    *CarePlanOutput        `json:"careplan,omitempty"`
	Debug       map[string]interface{} `json:"debug,omitempty"`
}

Output object

func NewOutput

func NewOutput(algorithmName string) *Output

NewOutput function

type OutputError added in v1.6.4

type OutputError struct {
	Category string   `json:"category"`
	Key      string   `json:"key"`
	Messages []string `json:"messages"`
}

OutputError object

Jump to

Keyboard shortcuts

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