fasten-onprem/backend/pkg/models/patient_profile.go

47 lines
2.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package models
import "gorm.io/gorm"
//demographics Object (optional) (See demographics)
//alcohol Object (optional) The users alcohol usage. See alcohol object.
//smoking Object (optional) The users smoking habits. See smoking object.
type PatientProfile struct {
gorm.Model
User User `json:"user,omitempty"`
UserID uint `json:"user_id" gorm:"uniqueIndex:idx_user_provider_patient"`
ProviderId string `json:"provider_id" gorm:"uniqueIndex:idx_user_provider_patient"`
PatientId string `json:"patient_id" gorm:"uniqueIndex:idx_user_provider_patient"`
//embedded structs
Demographics `json:"demographics,omitempty"`
}
type Demographics struct {
Address Address `json:"address"` // Object (See address object)
Dob string `json:"dob"` //String (optional) The users date of birth e.g. "04/21/1965"
Ethnicity string `json:"ethnicity"` // String (optional) The ethnicity of the user e.g. "Not Hispanic of Latino"
Gender string `json:"gender"` // String (optional) The users gender e.g. "male"
Language string `json:"language"` //String (optional) The users primary language e.g. "eng"
MaritalStatus string `json:"maritalStatus"` // String (optional) The users marital status (eg: “married”, “single”)
Name Name `json:"name"` // Object (optional) (See name object)
Race string `json:"race"` // String (optional) The users race e.g. "White"
EthnicityCodes string `json:"ethnicityCodes"` // ethnicityCodes Array[Object] (optional) CDC Race & Ethnicity and SNOMED CT Ethnicity codes: See codes
MaritalStatusCodes string `json:"maritalStatusCodes"` // String (optional) SNOMED CT Marital status codes: see codes object
GenderCodes string `json:"genderCodes"` //String (optional) SNOMED CT Gender codes: See codes
}
type Address struct {
City string `json:"city"` // (optional) City of address e.g. "SAN FRANCISCO"
Country string `json:"country"` // (optional) Country of address e.g. "US"
State string `json:"state"` // (optional) State of address e.g. "CA"
Street []string `json:"street"` // Array[String] (optional) Street of address e.g. ["156 22ND AVE NW"]
Zip string `json:"zip"` // (optional) Zip of address e.g. "94123"
}
type Name struct {
Prefix string `json:"prefix"` // String (optional) The title of the provider e.g. "MD"
Given []string `json:"given"` // Array[String] Name values associated with the provider e.g. ["Travis", "R"]
Family string `json:"family"` // String (optional) Family name of the provider e.g. "Liddell"
}