models

package
v0.0.0-...-5a6575c Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyFeatures []Feature

Functions

func CleanUpCoordinates

func CleanUpCoordinates(coordInterface interface{}) ([]interface{}, error)

Types

type Address

type Address struct {
	Type        string        `json:"type,omitempty" bson:"type,omitempty"`
	Use         string        `json:"use,omitempty" bson:"use,omitempty"`
	Text        string        `json:"text,omitempty" bson:"text,omitempty"`
	Comment     string        `json:"comment,omitempty" bson:"comment,omitempty"`
	Line        []interface{} `json:"line,omitempty" bson:"line,omitempty"`
	Census      string        `json:"census,omitempty" bson:"census,omitempty"`
	PostalCode  string        `json:"postal_code,omitempty" bson:"postal_code,omitempty"`
	City        string        `json:"city,omitempty" bson:"city,omitempty"`
	DistrictIso string        `json:"district_iso,omitempty" bson:"district_iso,omitempty"`
	StateIso    string        `json:"state_iso,omitempty" bson:"state_iso,omitempty"`
	CountryIso  string        `json:"country_iso,omitempty" bson:"country_iso,omitempty"`
	Period      Period        `json:"period,omitempty" bson:"period,omitempty"`
}

type AddressFhireR4

type AddressFhireR4 struct {
	Use        string   `bson:"use" json:"use"`
	Line       []string `bson:"line" json:"line"`
	City       string   `bson:"city" json:"city"`
	State      string   `bson:"state" json:"state"`
	PostalCode string   `bson:"postalCode" json:"postalCode"`
}

type Appointment

type Appointment struct {
	ID string `json:"id,omitempty" bson:"id,omitempty"`
}

type AssignerFhireR4

type AssignerFhireR4 struct {
	Display string `bson:"display" json:"display"`
}

type At

type At struct {
	Place     Place     `json:"place,omitempty" bson:"place,omitempty"`
	Timestamp time.Time `json:"timestamp,omitempty" bson:"timestamp,omitempty"`
}

type Attested

type Attested struct {
	ProfessionalID string `json:"professional_id,omitempty" bson:"professional_id,omitempty"`
	PersonID       string `json:"person_id,omitempty" bson:"person_id,omitempty"`
	OrgID          string `json:"org_id,omitempty" bson:"org_id,omitempty"`
}

type Birthdata

type Birthdata struct {
	Date       time.Time `json:"date,omitempty" bson:"date,omitempty"`
	City       string    `json:"city,omitempty" bson:"city,omitempty"`
	Country    string    `json:"country,omitempty" bson:"country,omitempty"`
	LocationID string    `json:"location_id,omitempty" bson:"location_id,omitempty"`
}

type CommonName

type CommonName struct {
	NickName string `json:"nick_name,omitempty" bson:"nick_name,omitempty"`
}

type CountryFullInfo

type CountryFullInfo struct {
	Country    Display                  `json:"country_display,omitempty" bson:"country_display,omitempty"`
	CountryIso string                   `json:"county_iso,omitempty" bson:"county_iso,omitempty"`
	States     map[string]StateFullInfo `json:"states,omitempty" bson:"states,omitempty"`
}

type CountryFullInfoResponse

type CountryFullInfoResponse struct {
	Code    int             `json:"code,omitempty" bson:"code,omitempty"`
	Message string          `json:"message,omitempty" bson:"message,omitempty"`
	Data    CountryFullInfo `json:"data,omitempty" bson:"data,omitempty"`
}

type Courses

type Courses struct {
	LocalID string `json:"localId,omitempty" bson:"performed,omitempty"`
}

type Display

type Display struct {
	Localname  string                `json:"localname,omitempty" bson:"localname,omitempty"`
	I18NRegion map[string]I18NRegion `json:"i18n,omitempty" bson:"i18n,omitempty"`
}

type DistrictFullInfo

type DistrictFullInfo struct {
	DistrictDisplay Display `json:"district_display,omitempty" bson:"district_display,omitempty"`
	DistrictIso     string  `json:"district_iso,omitempty" bson:"district_iso,omitempty"`
}

type Donor

type Donor struct {
	ID string `json:"id,omitempty" bson:"id,omitempty"`
}

type EncounterUHC

type EncounterUHC struct {
	ID          string `json:"id,omitempty" bson:"id,omitempty"`
	Status      string `json:"status,omitempty" bson:"status,omitempty"`
	Appointment string `json:"appointment,omitempty" bson:"appointment,omitempty"`
	Period      string `json:"period,omitempty" bson:"period,omitempty"`
	Length      string `json:"length,omitempty" bson:"length,omitempty"`
	Location    string `json:"location,omitempty" bson:"location,omitempty"`
}

type ExtensionFhireR4

type ExtensionFhireR4 struct {
	URL                  string                      `bson:"url" json:"url"`
	ValueCodeableConcept ValueCodeableConceptFhireR4 `bson:"valueCodeableConcept" json:"valueCodeableConcept"`
}

type ExternalId

type ExternalId struct {
	System string `json:"system,omitempty" bson:"system,omitempty"`
	Value  string `json:"value,omitempty" bson:"value,omitempty"`
}

type ExternalIdSub

type ExternalIdSub struct {
	System string   `json:"system,omitempty" bson:"system,omitempty"`
	Value  []string `json:"value,omitempty" bson:"value,omitempty"`
}

type ExternalIdentifier

type ExternalIdentifier struct {
	System string `json:"system,omitempty" bson:"system,omitempty"`
	Value  string `json:"value,omitempty" bson:"value,omitempty"`
}

type Feature

type Feature struct {
	Type       string                 `json:"type" bson:"type"`
	Geometry   Geometry               `json:"geometry" bson:"geometry"`                         // Coordinate Reference System Objects are not currently supported
	Properties map[string]interface{} `json:"properties,omitempty" bson:"properties,omitempty"` // Coordinate Reference System Objects are not currently supported
}

func (*Feature) Validate

func (feature *Feature) Validate() error

type Flag

type Flag struct {
	URL string `json:"url,omitempty" bson:"url,omitempty"`
}

type GenderFhireR4_

type GenderFhireR4_ struct {
	Extension []ExtensionFhireR4 `bson:"extension" json:"extension"`
}

type Genderdata

type Genderdata struct {
	Administrative string `json:"administrative,omitempty" bson:"administrative,omitempty"`
	Biological     string `json:"biological,omitempty" bson:"biological,omitempty"`
}

type Geojson

type Geojson struct {
	Type     string                 `json:"type" bson:"type"`
	CRS      map[string]interface{} `json:"crs,omitempty" bson:"crs,omitempty"` // Coordinate Reference System Objects are not currently supported
	Name     string                 `json:"name" bson:"name"`
	Features []Feature              `json:"features" bson:"features"`
}

func GeojsonFromFile

func GeojsonFromFile(jsonFile *os.File) (geometry Geojson)

func (*Geojson) CleanUpFeatures

func (geojson *Geojson) CleanUpFeatures()

func (*Geojson) PropertyNames

func (geojson *Geojson) PropertyNames() map[string]string

type Geometry

type Geometry struct {
	Type        string                 `json:"type" bson:"type"`
	BoundingBox []float64              `json:"bbox,omitempty" bson:"bbox,omitempty"`
	Coordinates interface{}            `json:"coordinates,omitempty" bson:"coordinates,omitempty"`
	CRS         map[string]interface{} `json:"crs,omitempty" bson:"crs,omitempty"` // Coordinate Reference System Objects are not currently supported
}

type HealthUserUHC

type HealthUserUHC struct {
	ID           string      `json:"id,omitempty" bson:"id,omitempty"`
	IndividualId string      `json:"individual_id,omitempty" bson:"individual_id,omitempty"`
	MedicalData  MedicalData `json:"medical_data,omitempty" bson:"medical_data,omitempty"`
	Courses      Courses     `json:"courses,omitempty" bson:"courses,omitempty"`
	Donor        Donor       `json:"donor,omitempty" bson:"donor,omitempty"`
}

type I18NRegion

type I18NRegion struct {
	Common string `json:"common,omitempty" bson:"common,omitempty"`
}

type IdentifierFhireR4

type IdentifierFhireR4 struct {
	Use      string          `bson:"use" json:"use"`
	Type     TypeFhireR4     `bson:"type" json:"type"`
	System   string          `bson:"system" json:"system"`
	Value    string          `bson:"value" json:"value"`
	Period   PeriodFhireR4   `bson:"period" json:"period"`
	Assigner AssignerFhireR4 `bson:"assigner" json:"assigner"`
}

type IdentityUHC

type IdentityUHC struct {
	ID                string        `json:"id,omitempty" bson:"id,omitempty"`
	IndividualID      string        `json:"individual_id,omitempty" bson:"individual_id,omitempty"`
	Type              string        `json:"type,omitempty" bson:"type,omitempty"`
	Period            string        `json:"period,omitempty" bson:"period,omitempty"`
	Related           string        `json:"related,omitempty" bson:"related,omitempty"`
	Country           string        `json:"country,omitempty" bson:"country,omitempty"`
	OfficialDocType   string        `json:"official_doctype,omitempty" bson:"official_doctype,omitempty"`
	OfficialDocNumber string        `json:"official_doc_number,omitempty" bson:"official_doc_number,omitempty"`
	OfficialName      OfficialName  `json:"official_name,omitempty" bson:"official_name,omitempty"`
	BirthData         Birthdata     `json:"birth_data,omitempty" bson:"birth_data,omitempty"`
	GenderData        Genderdata    `json:"gender_data,omitempty" bson:"gender_data,omitempty"`
	OfficialAddress   []Address     `json:"official_address,omitempty" bson:"official_address,omitempty"`
	RelatedPerson     []interface{} `json:"related_person,omitempty" bson:"related_person,omitempty"`
	Verified          Verified      `json:"verified,omitempty" bson:"verified,omitempty"`
	Temporal          bool          `json:"temporal,omitempty" bson:"temporal,omitempty"`
}

type IdentityUHCResponse

type IdentityUHCResponse struct {
	Code    int
	Message string
	Data    []IdentityUHC
}

type IndividualUHC

type IndividualUHC struct {
	Type         int           `json:"type,omitempty" bson:"type,omitempty"`
	Display      string        `json:"display,omitempty" bson:"display,omitempty"`
	ID           string        `json:"id,omitempty" bson:"id,omitempty"`
	PublicId     []PublicId    `json:"public_id,omitempty" bson:"public_id,omitempty"`
	IdentityIDs  []string      `json:"identity_ids,omitempty" bson:"identity_ids,omitempty"`
	Verification Verification  `json:"verification,omitempty" bson:"verification,omitempty"`
	PersonalData PersonalData  `json:"personal_data,omitempty" bson:"personal_data,omitempty"`
	EncounterIds []string      `json:"encounter_ids,omitempty" bson:"encounter_ids,omitempty"`
	Profiles     []interface{} `json:"profiles,omitempty" bson:"profiles,omitempty"`
}

type IndividualUHCResponse

type IndividualUHCResponse struct {
	Code    int             `json:"code,omitempty" bson:"code,omitempty"`
	Message string          `json:"message,omitempty" bson:"message,omitempty"`
	Data    []IndividualUHC `json:"data,omitempty" bson:"data,omitempty"`
	Count   int64           `json:"count,omitempty" bson:"count,omitempty"`
}

type IndividualUHCWithIdentity

type IndividualUHCWithIdentity struct {
	Individual IndividualUHC `json:"individual,omitempty" bson:"individual,omitempty"`
	Identity   []IdentityUHC `json:"identity,omitempty" bson:"identity,omitempty"`
}

type IndividualUHCWithIdentityResponse

type IndividualUHCWithIdentityResponse struct {
	Code    int                         `json:"code,omitempty" bson:"code,omitempty"`
	Message string                      `json:"message,omitempty" bson:"message,omitempty"`
	Data    []IndividualUHCWithIdentity `json:"data,omitempty" bson:"data,omitempty"`
	Count   int64                       `json:"count,omitempty" bson:"count,omitempty"`
}

type LinkFhireR4

type LinkFhireR4 struct {
	TargetFhireR4 struct {
		Reference string `bson:"reference" json:"reference"`
		Display   string `bson:"display" json:"display"`
	} `bson:"target" json:"target"`
}

type Locale

type Locale struct {
	CallingCode       []string `json:"calling_code,omitempty" bson:"calling_code,omitempty"`
	Currency          []string `json:"currency,omitempty" bson:"currency,omitempty"`
	OfficialLanguages []string `json:"official_languages,omitempty" bson:"official_languages,omitempty"`
}

type LocationUHC

type LocationUHC struct {
	ID                     string               `json:"id,omitempty" bson:"id,omitempty"`
	Name                   TextI18n             `json:"name,omitempty" bson:"name,omitempty"`
	Status                 string               `json:"status,omitempty" bson:"status,omitempty"`
	Type                   []string             `json:"type,omitempty" bson:"type,omitempty"`
	PhysicalType           string               `json:"pysical_type,omitempty" bson:"pysical_type,omitempty"`
	Telecom                []Telecom            `json:"telecom,omitempty" bson:"telecom,omitempty"`
	MapWebData             MapWebData           `json:"map_web_data,omitempty" bson:"map_web_data,omitempty"`
	TimeAvailability       string               `json:"time_availability,omitempty" bson:"time_availability,omitempty"`
	Address                Address              `json:"address,omitempty" bson:"address,omitempty"`
	PartOfID               string               `json:"part_of_id,omitempty" bson:"part_of_id,omitempty"`
	ManagingOrganizationID string               `json:"managing_organization_id,omitempty" bson:"managing_organization_id,omitempty"`
	ExternalIdentifier     []ExternalIdentifier `json:"external_identifier,omitempty" bson:"external_identifier,omitempty"`
	Geojson                Geojson              `json:"geojson,omitempty" bson:"geojson,omitempty"`
}

type LocationUHCResponse

type LocationUHCResponse struct {
	Code    int           `json:"code,omitempty" bson:"code,omitempty"`
	Message string        `json:"message,omitempty" bson:"message,omitempty"`
	Data    []LocationUHC `json:"data,omitempty" bson:"data,omitempty"`
	Count   int64         `json:"count,omitempty" bson:"count,omitempty"`
}

type ManagingOrganizationFhireR4

type ManagingOrganizationFhireR4 struct {
	Reference string `bson:"reference" json:"reference"`
	Display   string `bson:"display" json:"display"`
}

type MapWebData

type MapWebData struct {
	Url string `json:"url,omitempty" bson:"url,omitempty"`
}

type MedicalData

type MedicalData struct {
	ID string `json:"id,omitempty" bson:"id,omitempty"`
}

type NameFhireR4

type NameFhireR4 struct {
	Use    string   `bson:"use" json:"use"`
	Family string   `bson:"family" json:"family,omitempty"`
	Given  []string `bson:"given" json:"given"`
}

type OfficialName

type OfficialName struct {
	ID         string   `json:"id,omitempty" bson:"id,omitempty"`
	GivenName  string   `json:"given_name,omitempty" bson:"given_name,omitempty"`
	MiddleName string   `json:"middle_name,omitempty" bson:"middle_name,omitempty"`
	Surname1   string   `json:"surname1,omitempty" bson:"surname1,omitempty"`
	Surname2   string   `json:"surname2,omitempty" bson:"surname2,omitempty"`
	NameOrder  []string `json:"name_order,omitempty" bson:"name_order,omitempty"`
}

type Organization

type Organization struct {
	ID        string `json:"id,omitempty" bson:"id,omitempty"`
	LocalCard string `json:"local_card,omitempty" bson:"local_card,omitempty"`
}

type PatientFhireR4

type PatientFhireR4 struct {
	ResourceType         string                      `bson:"resourceType" json:"resourceType"`
	ID                   string                      `bson:"id" json:"id"`
	Text                 TextFhireR4                 `bson:"text" json:"text"`
	Identifier           []IdentifierFhireR4         `bson:"identifier" json:"identifier"`
	Active               bool                        `bson:"active" json:"active"`
	Name                 []NameFhireR4               `bson:"name" json:"name"`
	Gender               string                      `bson:"gender" json:"gender"`
	Gender_              GenderFhireR4_              `bson:"_gender" json:"_gender"`
	Photo                []PhotoFhireR4              `bson:"photo" json:"photo"`
	ManagingOrganization ManagingOrganizationFhireR4 `bson:"managingOrganization" json:"managingOrganization"`
	Link                 []LinkFhireR4               `bson:"link" json:"link"`
}

type Period

type Period struct {
	Start time.Time `json:"start,omitempty" bson:"start,omitempty"`
	End   time.Time `json:"end,omitempty" bson:"end,omitempty"`
}

type PeriodFhireR4

type PeriodFhireR4 struct {
	Start string `bson:"start" json:"start"`
}

type PersonFhireR4

type PersonFhireR4 struct {
	ResourceType string              `bson:"resourceType" json:"resourceType"`
	ID           string              `bson:"id" json:"id"`
	Text         TextFhireR4         `bson:"text" json:"text"`
	Identifier   []IdentifierFhireR4 `bson:"identifier" json:"identifier"`
	Name         []NameFhireR4       `bson:"name" json:"name"`
	Telecom      []TelecomFhireR4    `bson:"telecom" json:"telecom"`
	Gender       string              `bson:"gender" json:"gender"`
	BirthDate    string              `bson:"birthDate" json:"birthDate"`
	Address      []AddressFhireR4    `bson:"address" json:"address"`
	Active       bool                `bson:"active" json:"active"`
	Link         []LinkFhireR4       `bson:"link" json:"link"`
}

type PersonalData

type PersonalData struct {
	MainIdentityId string     `json:"main_identity_id,omitempty" bson:"main_identity_id,omitempty"`
	Address        []Address  `json:"address,omitempty" bson:"address,omitempty"`
	CommonName     CommonName `json:"common_name,omitempty" bson:"common_name,omitempty"`
	Telecom        []Telecom  `json:"telecom,omitempty" bson:"telecom,omitempty"`
	Photo          string     `json:"photo,omitempty" bson:"photo,omitempty"`
	Ethic          string     `json:"ethic,omitempty" bson:"ethic,omitempty"`
	Religion       string     `json:"religion,omitempty" bson:"religion,omitempty"`
}

type Phlebotomy

type Phlebotomy struct {
	Arm    string `json:"arm,omitempty" bson:"arm,omitempty"`
	Issue  string `json:"issue,omitempty" bson:"issue,omitempty"`
	Status string `json:"status,omitempty" bson:"status,omitempty"`
}

type PhotoFhireR4

type PhotoFhireR4 struct {
	ContentType string `bson:"contentType" json:"contentType"`
	Data        string `bson:"data" json:"data"`
}

type Place

type Place struct {
	LocationID string `json:"location_id,omitempty" bson:"location_id,omitempty"`
	Display    string `json:"display,omitempty" bson:"display,omitempty"`
}

type ProcedureUHC

type ProcedureUHC struct {
	ID              string `json:"id,omitempty" bson:"id,omitempty"`
	Performed       string `json:"performed,omitempty" bson:"performed,omitempty"`
	Performer       string `json:"performer,omitempty" bson:"performer,omitempty"`
	State           string `json:"state,omitempty" bson:"state,omitempty"`
	Success         string `json:"success,omitempty" bson:"success,omitempty"`
	Interruption    string `json:"interruption,omitempty" bson:"interruption,omitempty"`
	Complication    string `json:"complication,omitempty" bson:"complication,omitempty"`
	Adversereaction string `json:"adversereaction,omitempty" bson:"adversereaction,omitempty"`
	Note            string `json:"note,omitempty" bson:"note,omitempty"`
	Outcome         string `json:"outcome,omitempty" bson:"outcome,omitempty"`
}

type PublicId

type PublicId struct {
	Type  string `json:"type,omitempty" bson:"type,omitempty"`
	Value string `json:"value,omitempty" bson:"vale,omitempty"`
}

type Response

type Response struct {
	Code    int
	Message string
	Data    interface{}
	Count   int64
}

type StateFullInfo

type StateFullInfo struct {
	StateDisplay Display                     `json:"state_display,omitempty" bson:"state_display,omitempty"`
	StateIso     string                      `json:"state_iso,omitempty" bson:"state_iso,omitempty"`
	Districts    map[string]DistrictFullInfo `json:"districts,omitempty" bson:"districts,omitempty"`
}

type Telecom

type Telecom struct {
	Use    string `bson:"use" json:"use"`
	System string `bson:"system" json:"system,omitempty"`
	Value  string `bson:"value" json:"value,omitempty"`
}

type TelecomFhireR4

type TelecomFhireR4 struct {
	Use    string `bson:"use" json:"use"`
	System string `bson:"system" json:"system,omitempty"`
	Value  string `bson:"value" json:"value,omitempty"`
}

type TextFhireR4

type TextFhireR4 struct {
	Status string `bson:"status" json:"status"`
	Div    string `bson:"div" json:"div"`
}

type TextI18n

type TextI18n struct {
	Default string            `json:"default,omitempty" bson:"default,omitempty"`
	I18n    map[string]string `json:"i18n,omitempty" bson:"i18n,omitempty"`
}

type Token

type Token struct {
	UserId   string
	Username string
	jwt.StandardClaims
}

JWT claims struct

type TypeFhireR4

type TypeFhireR4 struct {
	Coding []struct {
		System string `bson:"system" json:"system"`
		Code   string `bson:"code" json:"code"`
	} `bson:"coding" json:"coding"`
}

type User

type User struct {
	Username string   `bson:"username" json:"username,omitempty"`
	Password string   `bson:"password" json:"password,omitempty"`
	Token    string   `bson:"token" json:"token,omitempty"`
	ID       string   `json:"id,omitempty"`
	Email    string   `json:"email"`
	Role     []string `json:"role"`
}

a struct to rep user user

type ValueCodeableConceptFhireR4

type ValueCodeableConceptFhireR4 struct {
	Coding []struct {
		System  string `bson:"system" json:"system"`
		Code    string `bson:"code" json:"code"`
		Display string `bson:"display" json:"display"`
	} `json:"coding"`
}

type Verification

type Verification struct {
	Type     string   `json:"type,omitempty" bson:"type,omitempty"`
	Done     bool     `json:"done,omitempty" bson:"done,omitempty"`
	Result   string   `json:"result,omitempty" bson:"result,omitempty"`
	Attested Attested `json:"attested,omitempty" bson:"attested,omitempty"`
	At       At       `json:"at,omitempty" bson:"at,omitempty"`
}

type Verified

type Verified struct {
	Done     bool     `json:"done,omitempty" bson:"done,omitempty"`
	Result   bool     `json:"result,omitempty" bson:"result,omitempty"`
	Attested Attested `json:"attested,omitempty" bson:"attested,omitempty"`
	At       At       `json:"at,omitempty" bson:"at,omitempty"`
}

type WorldDataUHC

type WorldDataUHC struct {
	ID                 string          `json:"id" bson:"id"`
	ExternalIdentifier []ExternalId    `json:"external_identifier" bson:"external_identifier"`
	Level              string          `json:"level" bson:"level"`
	LevelType          string          `json:"level_type" bson:"level_type"`
	Sub                []ExternalIdSub `json:"sub" bson:"sub"`
	Root               []ExternalId    `json:"root" bson:"root"`
	Flag               Flag            `json:"flag" bson:"flag"`
	Locale             Locale          `json:"locale" bson:"locale"`
	Geojson            Geojson         `json:"geojson" bson:"geojson"`
	Display            Display         `json:"display" bson:"display"`
}

type WorldDataUHCResponse

type WorldDataUHCResponse struct {
	Code    int            `json:"code,omitempty" bson:"code,omitempty"`
	Message string         `json:"message,omitempty" bson:"message,omitempty"`
	Data    []WorldDataUHC `json:"data,omitempty" bson:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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