model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: GPL-3.0 Imports: 1 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 {
	ID         string             `json:"id"`
	Period     Period             `json:"period"`
	Use        string             `json:"use"`
	Line       []string           `json:"line"`
	PostalCode string             `json:"postalCode"`
	Extension  []AddressExtension `json:"extension"`
	Text       *string            `json:"text,omitempty"`
}

type AddressExtension

type AddressExtension struct {
	URL       string            `json:"url"`
	Extension []PurpleExtension `json:"extension"`
}

type Contact

type Contact struct {
	ID           string           `json:"id"`
	Period       Period           `json:"period"`
	Relationship []Relationship   `json:"relationship"`
	Telecom      []ContactTelecom `json:"telecom"`
}

type ContactTelecom

type ContactTelecom struct {
	System string `json:"system"`
	Value  string `json:"value"`
}

type Entry

type Entry struct {
	FullURL string `json:"fullUrl"`
	Search  Search `json:"search"`
	// In reality resource is type interface{} and would require unmarshalling the type based on ResourceType
	// But we can simply for now as NHS API only provides patient details
	Resource Patient `json:"resource"`
}

type FluffyExtension

type FluffyExtension struct {
	URL                  string        `json:"url"`
	ValueCodeableConcept *Relationship `json:"valueCodeableConcept,omitempty"`
	ValueDateTime        *string       `json:"valueDateTime,omitempty"`
	ValueBoolean         *bool         `json:"valueBoolean,omitempty"`
	ValueString          *string       `json:"valueString,omitempty"`
}

type GeneralPractitioner

type GeneralPractitioner struct {
	ID         string                        `json:"id"`
	Type       string                        `json:"type"`
	Identifier GeneralPractitionerIdentifier `json:"identifier"`
}

type GeneralPractitionerIdentifier

type GeneralPractitionerIdentifier struct {
	System string `json:"system"`
	Value  string `json:"value"`
	Period Period `json:"period"`
}

type IdentifierElement

type IdentifierElement struct {
	System    string                `json:"system"`
	Value     string                `json:"value"`
	Extension []IdentifierExtension `json:"extension"`
}

type IdentifierExtension

type IdentifierExtension struct {
	URL                  string       `json:"url"`
	ValueCodeableConcept Relationship `json:"valueCodeableConcept"`
}

type Meta

type Meta struct {
	VersionID string     `json:"versionId"`
	Security  []Security `json:"security"`
}

type Name

type Name struct {
	ID     string   `json:"id"`
	Use    string   `json:"use"`
	Period Period   `json:"period"`
	Given  []string `json:"given"`
	Family string   `json:"family"`
	Prefix []string `json:"prefix"`
	Suffix []string `json:"suffix"`
}

type Patient

type Patient struct {
	ResourceType         string                `json:"resourceType"`
	ID                   string                `json:"id"`
	Identifier           []IdentifierElement   `json:"identifier"`
	Meta                 Meta                  `json:"meta"`
	Name                 []Name                `json:"name"`
	Gender               string                `json:"gender"`
	BirthDate            string                `json:"birthDate"`
	MultipleBirthInteger int64                 `json:"multipleBirthInteger"`
	DeceasedDateTime     string                `json:"deceasedDateTime"`
	Address              []Address             `json:"address"`
	Telecom              []ResourceTelecom     `json:"telecom"`
	Contact              []Contact             `json:"contact"`
	GeneralPractitioner  []GeneralPractitioner `json:"generalPractitioner"`
	Extension            []ResourceExtension   `json:"extension"`
}

type Period

type Period struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type PurpleExtension

type PurpleExtension struct {
	URL         string       `json:"url"`
	ValueCoding *ValueCoding `json:"valueCoding,omitempty"`
	ValueString *string      `json:"valueString,omitempty"`
}

type Relationship

type Relationship struct {
	Coding []Security `json:"coding"`
}

type ResourceExtension

type ResourceExtension struct {
	URL            string            `json:"url"`
	Extension      []FluffyExtension `json:"extension"`
	ValueReference *ValueReference   `json:"valueReference,omitempty"`
	ValueAddress   *ValueAddress     `json:"valueAddress,omitempty"`
}

type ResourceTelecom

type ResourceTelecom struct {
	ID        string             `json:"id"`
	Period    Period             `json:"period"`
	System    string             `json:"system"`
	Value     string             `json:"value"`
	Use       string             `json:"use"`
	Extension []TelecomExtension `json:"extension,omitempty"`
}

type Result

type Result struct {
	ResourceType string  `json:"resourceType"`
	Type         string  `json:"type"`
	Timestamp    string  `json:"timestamp"`
	Total        int64   `json:"total"`
	Entry        []Entry `json:"entry"`
}

func UnmarshalResult

func UnmarshalResult(data []byte) (Result, error)

func (*Result) Marshal

func (r *Result) Marshal() ([]byte, error)
type Search struct {
	Score float64 `json:"score"`
}

type Security

type Security struct {
	System  string  `json:"system"`
	Code    string  `json:"code"`
	Display string  `json:"display"`
	Version *string `json:"version,omitempty"`
}

type TelecomExtension

type TelecomExtension struct {
	URL         string   `json:"url"`
	ValueCoding Security `json:"valueCoding"`
}

type ValueAddress

type ValueAddress struct {
	City     string `json:"city"`
	District string `json:"district"`
	Country  string `json:"country"`
}

type ValueCoding

type ValueCoding struct {
	System string `json:"system"`
	Code   string `json:"code"`
}

type ValueReference

type ValueReference struct {
	Identifier IdentifierElement `json:"identifier"`
}

Jump to

Keyboard shortcuts

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