fhir

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Date      = "date"
	Timestamp = "timestamp"
)

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors, and returns them if present.

func ParseError

func ParseError(raw interface{}) string

ParseError returns a string representation of an error struct

Types

type BackboneElement

type BackboneElement struct {
	Element
}

type Bundle

type Bundle struct {
	Type  string        `json:"type,omitempty"`
	Total int64         `json:"total,omitempty"`
	Entry []BundleEntry `json:"entry,omitempty"`
}

Bundle represents a FHIR bundle response

type BundleEntry

type BundleEntry struct {
	FullURL  string          `json:"fullUrl,omitempty"`
	Resource json.RawMessage `json:"resource,omitempty"`
}

BundleEntry represents a entry item in a bundle

type Code

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

Code describes a coding

type CodeableConcept

type CodeableConcept struct {
	Coding []Coding `json:"coding,omitempty"`
	Text   string   `json:"text,omitempty"`
}

type Coding

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

type DomainResource

type DomainResource struct {
	Resource
	Text      *Narrative    `json:"text,omitempty"`
	Contained []interface{} `json:"contained,omitempty"`
}

type Element

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

type ErrorResponse

type ErrorResponse struct {
	Response *http.Response `json:"-"`
	Code     string         `json:"responseCode"`
	Message  string         `json:"responseMessage"`
}

ErrorResponse represents an IAM errors response containing a code and a human readable message

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type FHIRDateTime

type FHIRDateTime struct {
	Time      time.Time
	Precision Precision
}

func (FHIRDateTime) MarshalJSON

func (f FHIRDateTime) MarshalJSON() ([]byte, error)

func (FHIRDateTime) UnmarshalJSON

func (f FHIRDateTime) UnmarshalJSON(data []byte) (err error)

type Issue

type Issue struct {
	Severity string `json:"Severity"`
	Details  string `json:"Details"`
	Code     Code   `json:"Code"`
}

Issue descrbies an issue

type IssueResponse

type IssueResponse struct {
	Issues []Issue `json:"issue"`
}

IssueResponse enscapsaltes one or more issues

type Meta

type Meta struct {
	Element
	VersionId   string        `json:"versionId,omitempty"`
	LastUpdated *FHIRDateTime `json:"lastUpdated,omitempty"`
	Profile     []string      `json:"profile,omitempty"`
	Security    []Coding      `json:"security,omitempty"`
	Tag         []Coding      `json:"tag,omitempty"`
}

type Narrative

type Narrative struct {
	Status string `bson:"status,omitempty" json:"status,omitempty"`
	Div    string `bson:"div,omitempty" json:"div,omitempty"`
}

type OperationOutcome

type OperationOutcome struct {
	DomainResource
	Issue []OperationOutcomeIssueComponent `json:"issue,omitempty"`
}

type OperationOutcomeIssueComponent

type OperationOutcomeIssueComponent struct {
	BackboneElement
	Severity    string           `json:"severity,omitempty"`
	Code        string           `json:"code,omitempty"`
	Details     *CodeableConcept `json:"details,omitempty"`
	Diagnostics string           `json:"diagnostics,omitempty"`
	Location    []string         `json:"location,omitempty"`
}

type Precision

type Precision string

type Resource

type Resource struct {
	ResourceType  string `json:"resourceType,omitempty"`
	ID            string `json:"id,omitempty"`
	Meta          *Meta  `json:"meta,omitempty"`
	ImplicitRules string `bson:"implicitRules,omitempty" json:"implicitRules,omitempty"`
	Language      string `bson:"language,omitempty" json:"language,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳