Documentation ¶
Overview ¶
Package fhir provides a library for working with R4 Google FHIR protos: https://github.com/google/fhir.
This provides various quality-of-life utilities over the base FHIR definitions, such as:
- Defining abstract base resources as their respective interfaces - Creation functions for Elements - Access utilities for ContainedResources and References - etc.
Index ¶
- Constants
- Variables
- func Annotation(text, author string, when time.Time) *dtpb.Annotation
- func AnnotationReference(text string, author *dtpb.Reference, when time.Time) *dtpb.Annotation
- func Base64Binary(value []byte) *dtpb.Base64Binary
- func Boolean(value bool) *dtpb.Boolean
- func Code(value string) *dtpb.Code
- func CodeableConcept(text string, coding ...*dtpb.Coding) *dtpb.CodeableConcept
- func Coding(system, code string) *dtpb.Coding
- func CodingWithVersion(system, code, version string) *dtpb.Coding
- func ContactDetail(name string, telecom ...*dtpb.ContactPoint) *dtpb.ContactDetail
- func ContactPoint(system cpb.ContactPointSystemCode_Value, value string) *dtpb.ContactPoint
- func Date(t time.Time) *dtpb.Date
- func DateNow() *dtpb.Date
- func DateTime(t time.Time) *dtpb.DateTime
- func DateTimeNow() *dtpb.DateTime
- func Days(value time.Duration) *dtpb.Duration
- func Decimal(value float64) *dtpb.Decimal
- func Duration(d time.Duration) *dtpb.Duration
- func DurationFromTime(t *dtpb.Time) *dtpb.Duration
- func EmailContactPoint(value string) *dtpb.ContactPoint
- func EscapeSearchParam(value string) string
- func FaxContactPoint(value string) *dtpb.ContactPoint
- func Hours(value time.Duration) *dtpb.Duration
- func ID(value string) *dtpb.Id
- func Identifier(system, value string) *dtpb.Identifier
- func Instant(t time.Time) *dtpb.Instant
- func InstantNow() *dtpb.Instant
- func Integer(value int32) *dtpb.Integer
- func IntegerFromInt(value int) (*dtpb.Integer, error)
- func IntegerFromPositiveInt(value *dtpb.PositiveInt) (*dtpb.Integer, error)
- func IntegerFromUnsignedInt(value *dtpb.UnsignedInt) (*dtpb.Integer, error)
- func IsID(id string) bool
- func Markdown(value string) *dtpb.Markdown
- func Microseconds(value time.Duration) *dtpb.Duration
- func Milliseconds(value time.Duration) *dtpb.Duration
- func Minutes(value time.Duration) *dtpb.Duration
- func Money(value float64) *dtpb.Money
- func MoneyQuantity(value float64, unit string) *dtpb.MoneyQuantity
- func MustParseDate(value string) *dtpb.Date
- func MustParseDateTime(value string) *dtpb.DateTime
- func MustParseInstant(value string) *dtpb.Instant
- func MustParseTime(time string) *dtpb.Time
- func Nanoseconds(value time.Duration) *dtpb.Duration
- func Narrative(value string) *dtpb.Narrative
- func OID(value string) *dtpb.Oid
- func OtherContactPoint(value string) *dtpb.ContactPoint
- func PagerContactPoint(value string) *dtpb.ContactPoint
- func ParseDate(value string) (*dtpb.Date, error)
- func ParseDateTime(value string) (*dtpb.DateTime, error)
- func ParseInstant(value string) (*dtpb.Instant, error)
- func ParseTime(value string) (*dtpb.Time, error)
- func Period(start, end time.Time) *dtpb.Period
- func PhoneContactPoint(value string) *dtpb.ContactPoint
- func PositiveInt(value uint32) *dtpb.PositiveInt
- func Quantity(value float64, unit string) *dtpb.Quantity
- func QuantityFromDuration(value *dtpb.Duration) *dtpb.Quantity
- func QuantityFromMoneyQuantity(value *dtpb.MoneyQuantity) *dtpb.Quantity
- func QuantityFromSimpleQuantity(value *dtpb.SimpleQuantity) *dtpb.Quantity
- func RandomID() *dtpb.Id
- func RandomUUID() *dtpb.Uuid
- func Range(low, high float64, unit string) *dtpb.Range
- func Ratio(numerator, denominator float64) *dtpb.Ratio
- func Seconds(value time.Duration) *dtpb.Duration
- func SimpleQuantity(value float64, unit string) *dtpb.SimpleQuantity
- func SmsContactPoint(value string) *dtpb.ContactPoint
- func String(value string) *dtpb.String
- func StringFromCode(code *dtpb.Code) *dtpb.String
- func StringFromID(id *dtpb.Id) *dtpb.String
- func StringFromMarkdown(markdown *dtpb.Markdown) *dtpb.String
- func Strings(values ...string) []*dtpb.String
- func Time(t time.Time) *dtpb.Time
- func TimeNow() *dtpb.Time
- func TimeOfDay(hour, minute, second, micros int64) (*dtpb.Time, error)
- func Timing(times ...time.Time) *dtpb.Timing
- func UCUMQuantity(value float64, unit string) *dtpb.Quantity
- func URI(value string) *dtpb.Uri
- func URIFromCanonical(canonical *dtpb.Canonical) *dtpb.Uri
- func URIFromOID(oid *dtpb.Oid) *dtpb.Uri
- func URIFromURL(url *dtpb.Url) *dtpb.Uri
- func URIFromUUID(uuid *dtpb.Uuid) *dtpb.Uri
- func URL(value string) *dtpb.Url
- func UUID(value string) *dtpb.Uuid
- func UnsignedInt(value uint32) *dtpb.UnsignedInt
- func XHTML(value string) *dtpb.Xhtml
- type BackboneElement
- type BackboneType
- type Base
- type CanonicalResource
- type DataType
- type DomainResource
- type Element
- type Extendable
- type MetadataResource
- type PrimitiveType
- type Resource
Constants ¶
const SearchSpecialChars = `\,$|`
These characters have special meaning in FHIR Search queries
Variables ¶
var ( // ErrIntegerDataLoss is an error raised in APIs that might unintentionally // truncate integral values that the user wouldn't expect. ErrIntegerDataLoss = errors.New("data-loss occurred during integer conversion") )
Functions ¶
func Annotation ¶
func Annotation(text, author string, when time.Time) *dtpb.Annotation
Annotation creates an R4 FHIR Annotation element with the specified text, author, and time of creation.
func AnnotationReference ¶
AnnotationReference creates an R4 FHIR Annotation element with the specified text, a reference to the author, and the time of creation.
func Base64Binary ¶
func Base64Binary(value []byte) *dtpb.Base64Binary
Base64Binary creates an R4 FHIR Base64Binary element the specified bytes.
func CodeableConcept ¶
func CodeableConcept(text string, coding ...*dtpb.Coding) *dtpb.CodeableConcept
CodeableConcept creates an R4 FHIR CodeableConcept with the specified codings, and with the Text element if the given text argument is non-empty.
Providing a non-empty Text element is good practice but not required. See: http://hl7.org/fhir/R4/datatypes.html#codeableconcept
func CodingWithVersion ¶
CodingWithVersion creates an R4 FHIR Coding element with the provided system, code, and version.
func ContactDetail ¶
func ContactDetail(name string, telecom ...*dtpb.ContactPoint) *dtpb.ContactDetail
ContactDetail creates an R4 FHIR ContactDetail element from a string value and the specified contact-points.
See: http://hl7.org/fhir/R4/metadatatypes.html#ContactDetail
func ContactPoint ¶
func ContactPoint(system cpb.ContactPointSystemCode_Value, value string) *dtpb.ContactPoint
ContactPoint creates an R4 FHIR ContactPoint element from the system and value.
func DateNow ¶
DateNow creates an R4 FHIR Date element at the current time using the highest available precision.
func DateTime ¶
DateTime creates an R4 FHIR DateTime element from a Time value, accurate to the microsecond.
func DateTimeNow ¶
DateTimeNow creates an R4 FHIR DateTime element at the current time using the highest available precision.
func Duration ¶
Duration creates a Duration proto with the provided value, computing the largest whole-unit of time that can be used to represent the time.
func DurationFromTime ¶
DurationFromTime converts an R4 FHIR Time Element into an R4 FHIR Duration value.
If the underlying time has Second-based precision, the returned Duration will also have seconds precision; otherwise this will fallback into nanosecond precision.
func EmailContactPoint ¶
func EmailContactPoint(value string) *dtpb.ContactPoint
EmailContactPoint creates an R4 FHIR ContactPoint element for the Email system given a value.
func EscapeSearchParam ¶
Escape values intended for use as a parameter in a FHIR Search.
These characters have special meaning in Search queries and must be backslash escaped:
`\`, `|`, `,`, `$`
This function assumes that URL-encoding is performed later. (Percent encoding is automatically handled by the healthcare client library when query params are passed as a map.)
For example, `foo,bar` becomes `foo\,bar`
func FaxContactPoint ¶
func FaxContactPoint(value string) *dtpb.ContactPoint
FaxContactPoint creates an R4 FHIR ContactPoint element for the Fax system given a value.
func Hours ¶
Hours creates a Duration proto with the specified time value, rounded to hour-accuracy.
func Identifier ¶
func Identifier(system, value string) *dtpb.Identifier
Identifier creates an R4 FHIR Identifier element with the provided system and value.
func Instant ¶
Instant creates an R4 FHIR Instant element from a Time value, accurate to the microsecond.
func InstantNow ¶
InstantNow creates an R4 FHIR Instant element at the current time using the highest available precision.
func IntegerFromInt ¶
IntegerFromInt creates an R4 FHIR Integer element from an int value.
Go's int type is architecture dependent, values greater than int32 will be truncated, as described in the go tour: https://tour.golang.org/basics/11 If this occurs, this function returns an error.
func IntegerFromPositiveInt ¶
func IntegerFromPositiveInt(value *dtpb.PositiveInt) (*dtpb.Integer, error)
IntegerFromPositiveInt attempts to create an R4 FHIR Integer element from a PositiveInt value. This function may fail of the value stored in the PositiveInt exceeds the cardinality of Integer, which may cause a signed integer overflow.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func IntegerFromUnsignedInt ¶
func IntegerFromUnsignedInt(value *dtpb.UnsignedInt) (*dtpb.Integer, error)
IntegerFromUnsignedInt attempts to create an R4 FHIR Integer element from an UnsignedInt value. This function may fail of the value stored in the UnsignedInt exceeds the cardinality of Integer, which may cause a signed integer overflow.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func IsID ¶
IsID returns true if the given string a valid FHIR ID. See http://hl7.org/fhir/R4/datatypes.html#id.
func Microseconds ¶
Microseconds creates a Duration proto with the specified time value, rounded to microsecond accuracy.
func Milliseconds ¶
Milliseconds creates a Duration proto with the specified time value, rounded to millisecond accuracy.
func Minutes ¶
Minutes creates a Duration proto with the specified time value, rounded to minute accuracy.
func MoneyQuantity ¶
func MoneyQuantity(value float64, unit string) *dtpb.MoneyQuantity
MoneyQuantity creates an R4 FHIR MoneyQuantity element from the value and units.
func MustParseDate ¶
MustParseDate parses a date as according to ParseDate, but panics if the date is invalid.
func MustParseDateTime ¶
MustParseDateTime parses a date as according to ParseDateTime, but panics if the date is invalid.
func MustParseInstant ¶
MustParseInstant parses a date as according to ParseInstant, but panics if the time is invalid.
func MustParseTime ¶
MustParseTime parses a date as according to ParseTime, but panics if the time is invalid.
func Nanoseconds ¶
Nanoseconds creates a Duration proto with the specified time value, rounded to nanosecond accuracy.
func OID ¶
OID creates an R4 FHIR OID element from a OID-string value, prepending the necessary "urn:oid:" to the value.
func OtherContactPoint ¶
func OtherContactPoint(value string) *dtpb.ContactPoint
OtherContactPoint creates an R4 FHIR ContactPoint element for the Other system given a value.
func PagerContactPoint ¶
func PagerContactPoint(value string) *dtpb.ContactPoint
PagerContactPoint creates an R4 FHIR ContactPoint element for the Pager system given a value.
func ParseDate ¶
ParseDate converts the input string into a FHIR Date element. The format of the input string must follow the FHIR Date format as defined in http://hl7.org/fhir/R4/datatypes.html#date, e.g.
- YYYY,
- YYYY-MM, or
- YYYY-MM-DD
The returned Date will have a precision equal to what was specified in the input string.
func ParseDateTime ¶
ParseDateTime converts the input string into a FHIR DateTime element. The format of the input string must follow the FHIR DateTime format as defined in http://hl7.org/fhir/R4/datatypes.html#datetime, e.g.
- YYYY,
- YYYY-MM,
- YYYY-MM-DD, or
- YYYY-MM-DDThh:mm:ss+zz:zz (with optional milli/micro precision)
The returned DateTime will have a precision equal to what was specified in the input string.
func ParseInstant ¶
ParseInstant converts the input string into a FHIR Instant element. The format of the input string must follow the FHIR Instant format as defined in http://hl7.org/fhir/R4/datatypes.html#instant, e.g.
- yyyy-mm-ddThh:mm:ss+zz:zz,
- yyyy-mm-ddThh:mm:ss.000+zz:zz, or
- yyyy-mm-ddThh:mm:ss.000000+zz:zz,
The returned Instant will have a precision equal to what was specified in the input string.
func ParseTime ¶
ParseTime converts the input string into a FHIR Time element. The format of the input string must follow the FHIR Time format as defined in http://hl7.org/fhir/R4/datatypes.html#time, e.g.
- hh:mm:ss,
- hh:mm:ss.000, or
- hh:mm:ss.000000,
The returned Time will have a precision equal to what was specified in the input string.
func PhoneContactPoint ¶
func PhoneContactPoint(value string) *dtpb.ContactPoint
PhoneContactPoint creates an R4 FHIR ContactPoint element for the Phone system given a value.
func PositiveInt ¶
func PositiveInt(value uint32) *dtpb.PositiveInt
PositiveInt creates an R4 FHIR PositiveInt element from a uint32 value.
func QuantityFromDuration ¶
QuantityFromDuration is a convenience utility for converting a Duration to its base-class definition of Quantity. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func QuantityFromMoneyQuantity ¶
func QuantityFromMoneyQuantity(value *dtpb.MoneyQuantity) *dtpb.Quantity
QuantityFromMoneyQuantity is a convenience utility for converting a MoneyQuantity to its base-class definition of Quantity. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func QuantityFromSimpleQuantity ¶
func QuantityFromSimpleQuantity(value *dtpb.SimpleQuantity) *dtpb.Quantity
QuantityFromSimpleQuantity is a convenience utility for converting a SimpleQuantity to its base-class definition of Quantity. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func RandomUUID ¶
RandomUUID generates a random new UUID.
func Range ¶
Range creates an R4 FHIR Range element with the given low and high end of the range, using the specified units.
func Seconds ¶
Seconds creates a Duration proto with the specified time value, rounded to second accuracy.
func SimpleQuantity ¶
func SimpleQuantity(value float64, unit string) *dtpb.SimpleQuantity
SimpleQuantity creates an R4 FHIR SimpleQuantity element from the given value and units.
func SmsContactPoint ¶
func SmsContactPoint(value string) *dtpb.ContactPoint
SmsContactPoint creates an R4 FHIR ContactPoint element for the SMS system given a value.
func StringFromCode ¶
StringFromCode is a convenience utility for converting a Code to its base-class definition of String. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func StringFromID ¶
StringFromID is a convenience utility for converting an Id to its base-class definition of String. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func StringFromMarkdown ¶
StringFromMarkdown is a convenience utility for converting Markdown to its base-class definition of String. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func Strings ¶
Strings creates an array of R4 FHIR String elements from a string value. This is offered as a convenience function, since many FHIR protos have arrays of FHIR string types, and converting between Go strings and FHIR strings is a common and repetitive process for some types.
func Time ¶
Time creates an R4 FHIR Time element from a Time value.
FHIR Time elements represent a time of day, disconnected from any date. As a result, the value stored in this proto will be modulo 24-hours to keep it within that 1 day time. Put differently, this will only ever be populated with the number of microseconds since the start of the unix epoch, modulo one day in microseconds.
func TimeNow ¶
TimeNow creates an R4 FHIR Time element at the current time using the highest available precision.
func TimeOfDay ¶
TimeOfDay creates a Time proto at the specified time.
This function will return an error if any of the values exceed the valid range for their time unit (e.g. if 'hour' exceeds 24, or minute exceeds 60, etc).
The precision is determine by the value set for the micro second parameter; if the value is 0, the precision is set to seconds. If the value is a multiple of 1000, the value is set to millisecond precision; otherwise, its set to microsecond precision.
func UCUMQuantity ¶
UCUMQuantity creates an R4 FHIR Quantity element representing a value and UCUM unit.
See: http://hl7.org/fhir/R4/datatypes.html#quantity TODO(PHP-9521): Add a unit package to validate against UCUM units.
func URIFromCanonical ¶
URIFromCanonical is a convenience utility for converting a canonical to its base-class definition of URI. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func URIFromOID ¶
URIFromOID is a convenience utility for converting an OID to its base-class definition of URI. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func URIFromURL ¶
URIFromURL is a convenience utility for converting a URL to its base-class definition of URI. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func URIFromUUID ¶
URIFromUUID is a convenience utility for converting a UUID to its base-class definition of URI. If the input is nil, this returns nil.
For more information, see the diagram for Primitive Types here: https://www.hl7.org/fhir/datatypes.html
func UUID ¶
UUID creates an R4 FHIR UUID element from a uuid-string value, prepending the necessary "urn:uuid:" to the value.
func UnsignedInt ¶
func UnsignedInt(value uint32) *dtpb.UnsignedInt
UnsignedInt creates an R4 FHIR UnsignedInt element from a uint32 value.
Types ¶
type BackboneElement ¶
BackboneElement is the base definition for all elements that are defined inside a resource - but not those in a data type.
See https://www.hl7.org/fhir/r4/backboneelement.html for more details.
This interface is defined by embedding the proto.Message interface, since all FHIR backbone elements in this library must also be proto.Message types.
type BackboneType ¶
type BackboneType interface { BackboneElement *dtpb.Timing | *dtpb.ElementDefinition | *dtpb.MarketingStatus | *dtpb.ProductShelfLife | *dtpb.Dosage }
BackboneType is a constraint-definition of FHIR backbone element, which all support ID, Extension, and modifier-extension fields, in addition to their base values.
Note: "BackboneType" is also an "BackboneElement", so these interfaces are logically equivalent -- and so this is represented as a constraint of valid datatypes.
The R4 spec doesn't explicitly refer to "BackboneType" as a distinction from "BackboneElement", but the R5 spec does, and its definition is compatible with R4. This is retained here so that we can have a proper vernacular and mechanism for referring to these types in generic ways through constraints.
See https://www.hl7.org/fhir/r5/types.html#BackboneType for more details.
type Base ¶
Base is the interface-definition of the FHIR abstract base type which is the ancestor of all FHIR objects (both resources and elements).
Represented in Go, this simply embeds the proto.Message interface, since this is a utility for the google/fhir proto definitions.
func UnwrapValueX ¶
UnwrapValueX obtains the underlying Message for oneof ValueX elements, which use a nested Choice field. Returns nil if the input message doesn't have a Choice field, or if the Oneof descriptor is unpopulated. See wrapped implementation for more information.
type CanonicalResource ¶
type CanonicalResource interface { GetUrl() *dtpb.Uri GetIdentifier() []*dtpb.Identifier GetVersion() *dtpb.String GetName() *dtpb.String GetTitle() *dtpb.String GetExperimental() *dtpb.Boolean GetDate() *dtpb.DateTime GetPublisher() *dtpb.String GetContact() []*dtpb.ContactDetail GetDescription() *dtpb.Markdown GetUseContext() []*dtpb.UsageContext GetJurisdiction() []*dtpb.CodeableConcept GetPurpose() *dtpb.Markdown GetCopyright() *dtpb.Markdown DomainResource }
CanonicalResource represents resources that have a canonical URL:
- They have a canonical URL (note: all resources with a canonical URL are specializations of this type)
- They have version, status, and data properties to help manage their publication
- They carry some additional metadata about their use, including copyright information
CanonicalResource objects may be the logical target of Canonical references.
Note: This is technically an "R5" interface type that is not officially part of the R4 spec, however its definition is still applicable and applies to "R4" resource types. Using this still provides us with a proper vernacular for referring to these resources.
See https://www.hl7.org/fhir/r5/canonicalresource.html for more details.
type DataType ¶
type DataType interface { Element primitiveDataType | complexDataType | metaDataType | specialPurposeDataType }
DataType is an constraint-definition of FHIR datatypes, which all support ID and Extension fields, in addition to their base values.
Note: "DataType" is also an "Element", so these interfaces are logically equivalent -- and so this is represented as a constraint of valid datatypes.
The R4 spec doesn't explicitly refer to "DataType" as a distinction from "Element", but the R5 spec does, and its definition is compatible with R4. This is retained here so that we can have a proper vernacular and mechanism for referring to these types in generic ways through constraints.
See https://www.hl7.org/fhir/r5/types.html#DataType for more details.
type DomainResource ¶
type DomainResource interface { GetText() *dtpb.Narrative GetContained() []*anypb.Any GetModifierExtension() []*dtpb.Extension Extendable Resource }
DomainResource is the interface-definition of the FHIR Abstract base type which is the ancestor of all FHIR domain resource objects (effectively everything that is not a datatype or bundle/contained-resource). See https://www.hl7.org/fhir/r4/domainresource.html for more details.
This interface extends from the `Resource` interface by embedding it. Any `DomainResource` is also a `Resource`.
type Element ¶
type Element interface { GetId() *dtpb.String Extendable Base }
Element is the base definition for all elements in a resource.
See https://www.hl7.org/fhir/r4/element.html for more details.
This interface is defined by embedding the proto.Message interface, since all FHIR elements in this library must also be proto.Message types.
type Extendable ¶
Extendable is an interface for abstraction resources or data-types that have extension properties.
This is not an official FHIR abstract class; this is something simply named here for the general convenience, since not all FHIR types are extendable.
This embeds the proto.Message interface into this interface to help distinguish that this still refers to protos in the process.
type MetadataResource ¶
type MetadataResource interface { GetApprovalDate() *dtpb.Date GetLastReviewDate() *dtpb.Date GetEffectivePeriod() *dtpb.Period GetTopic() []*dtpb.CodeableConcept GetAuthor() []*dtpb.ContactDetail GetEditor() []*dtpb.ContactDetail GetReviewer() []*dtpb.ContactDetail GetEndorser() []*dtpb.ContactDetail GetRelatedArtifact() []*dtpb.RelatedArtifact CanonicalResource }
MetadataResource represents resources that carry additional publication metadata over other CanonicalResources, describing their review and use in more details.
As an interface, this type is never created directly.
Note: This is technically an "R5" interface type that is not officially part of the R4 spec, however its definition is still applicable and applies to "R4" resource types. Using this still provides us with a proper vernacular for referring to these resources.
See https://www.hl7.org/fhir/r5/metadataresource.html for more details.
type PrimitiveType ¶
type PrimitiveType interface { Element // contains filtered or unexported methods }
PrimitiveType is a constraint-definition of FHIR datatypes, which all support ID and Extension fields, in addition to their base values.
Note: "DataType" is also an "Element", so these interfaces are logically equivalent -- and so this is represented as a constraint of valid datatypes.
The R4 spec doesn't explicitly refer to "PrimitiveType" as a distinction from "Element", but the R5 spec does, and its definition is compatible with R4. This is retained here so that we can have a proper vernacular and mechanism for referring to these types in generic ways through constraints.
See https://www.hl7.org/fhir/types.html#PrimitiveType for more details.
type Resource ¶
type Resource interface { GetId() *dtpb.Id GetImplicitRules() *dtpb.Uri GetMeta() *dtpb.Meta GetLanguage() *dtpb.Code Base }
Resource is the interface-definition of the FHIR Abstract base type which is the ancestor of all FHIR resources. See https://www.hl7.org/fhir/r4/resource.html#Resource for more details.
This interface is defined by embedding the proto.Message interface, since all FHIR resources in this library must also be proto.Message types