Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureInResource ¶
EnsureInResource ensures that the resource meta field exists.
func ReplaceInResource ¶
ReplaceInResource replaces the resource meta field with the provided meta object.
func Update ¶
Update updates meta in place with given opts.
Example ¶
package main import ( "fmt" dtpb "github.com/google/fhir/go/proto/google/fhir/proto/r4/core/datatypes_go_proto" "github.com/verily-src/fhirpath-go/internal/element/canonical" "github.com/verily-src/fhirpath-go/internal/element/meta" "github.com/verily-src/fhirpath-go/internal/fhir" ) func main() { m := &dtpb.Meta{} meta.Update(m, meta.WithTags(fhir.Coding("urn:oid:verily/sample-tag-system", "sample-tag-value")), meta.WithProfiles(canonical.New("urn:oid:verily/sample-profile")), ) fmt.Printf("meta.profile: %q\n", m.Profile[0].Value) fmt.Printf("meta.tag: {%q, %q}", m.Tag[0].System.Value, m.Tag[0].Code.Value) }
Output: meta.profile: "urn:oid:verily/sample-profile" meta.tag: {"urn:oid:verily/sample-tag-system", "sample-tag-value"}
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option is an option interface for modifying meta in place.
func IncludeProfiles ¶
IncludeProfiles appends to meta.profile.
func WithExtensions ¶
WithExtensions replaces meta.extension.
func WithProfiles ¶
WithProfiles replaces meta.profile.
Click to show internal directories.
Click to hide internal directories.