### Go: QuantityContext Initialization and Methods Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Defines the QuantityContext structure and associated functions for creating new contexts and accepting visitors. It also includes methods for retrieving the parser, the rule context, checking the context type, accessing a number terminal, and converting the context to a string tree. The Unit method specifically retrieves an IUnitContext. ```go type QuantityContext struct { antlr.BaseParserRuleContext // contains filtered or unexported fields } ``` ```go func NewEmptyQuantityContext() *QuantityContext ``` ```go func NewQuantityContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QuantityContext ``` ```go func (s *QuantityContext) Accept(visitor antlr.ParseTreeVisitor) interface{} ``` ```go func (s *QuantityContext) GetParser() antlr.Parser ``` ```go func (s *QuantityContext) GetRuleContext() antlr.RuleContext ``` ```go func (*QuantityContext) IsQuantityContext() ``` ```go func (s *QuantityContext) NUMBER() antlr.TerminalNode ``` ```go func (s *QuantityContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string ``` ```go func (s *QuantityContext) Unit() IUnitContext ``` -------------------------------- ### Get Time unit symbol in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/units The Symbol method, when called on a Time object, returns the string representation (symbol) of that time unit. For example, it might return "s" for Seconds. ```go func (t Time) Symbol() string ``` -------------------------------- ### Get URI String from ContainedResource (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.4.0/internal/containedresource Provides the Uniform Resource Identifier (URI) of a contained resource as a simple string. The URI is formatted as 'Type/ID', for example, 'Patient/123'. This is a convenient string representation for URIs. ```Go func URIString(cr *bcrpb.ContainedResource) string { // ... implementation ... } ``` -------------------------------- ### Go: ProgContext Methods Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Includes standard ANTLR methods like Accept, GetRuleContext, and GetParser, along with specific methods like EOF, Expression, IsProgContext, and ToStringTree for the ProgContext. ```go func (s *ProgContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { // ... implementation details ... } func (s *ProgContext) EOF() antlr.TerminalNode { // ... implementation details ... } func (s *ProgContext) Expression() IExpressionContext { // ... implementation details ... } func (s *ProgContext) GetParser() antlr.Parser { // ... implementation details ... } func (s *ProgContext) GetRuleContext() antlr.RuleContext { // ... implementation details ... } func (*ProgContext) IsProgContext() { // ... implementation details ... } func (s *ProgContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { // ... implementation details ... } ``` -------------------------------- ### Get URI from ContainedResource (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.4.0/internal/containedresource Retrieves the Uniform Resource Identifier (URI) of a contained resource in the format of a FHIR URI object. The URI is constructed as 'Type/ID', for example, 'Patient/123'. This function is useful for generating references to contained resources. ```Go func URI(cr *bcrpb.ContainedResource) *dtpb.Uri { // ... implementation ... } ``` -------------------------------- ### Compile Option: Enable Experimental Functions Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.2.1/fhirpath/compopts_tab=versions The `WithExperimentalFuncs` function returns a `CompileOption` that enables experimental functions within the FHIRPath engine. Use this option with caution as experimental features may change or be removed in future versions. ```Go func WithExperimentalFuncs() opts.CompileOption ``` -------------------------------- ### Create FHIR Bundle GET Entry (Versioned Read Interaction) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.1.0/internal/bundle Constructs a bundle entry for a GET request to retrieve a specific versioned FHIR resource, corresponding to the FHIR 'vread' interaction. Supports batch or transaction bundles. If version is empty, it performs a simple GET. ```go func NewVersionedGetEntry(typeName resource.Type, id string, version string, opts ...EntryOption) *bcrpb.Bundle_Entry { // ... implementation details ... } ``` -------------------------------- ### Bundle Entry Option Configuration (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/bundle_tab=versions Defines `EntryOption` interface and associated functions to configure specific options for individual bundle entries. This includes setting the `If-Match` header using `SetEntryIfMatch`, specifying the `Content-Type` via `WithFullURL`, and conditionally adding entries with `WithIfNoneExist`. `WithGeneratedFullURL` can be used for auto-generating URLs. ```go + type EntryOption interface + func WithFullURL(url string) EntryOption + func WithGeneratedFullURL() EntryOption + func WithIfNoneExist(identifier *dtpb.Identifier) EntryOption + func SetEntryIfMatch(entry *bcrpb.Bundle_Entry) ``` -------------------------------- ### Quantity Comparison and Utility Functions (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/system Provides methods for comparing Quantity objects, negating their values, and converting them to string or Protocol Buffer formats. Includes equality checks and less-than comparisons, with error handling for mismatched units or types. ```Go func (q Quantity) Equal(q2 Quantity) bool func (q Quantity) Less(input Any) (Boolean, error) func (q Quantity) Name() string func (q Quantity) Negate() Quantity func (q Quantity) String() string func (q Quantity) ToProtoQuantity() *dtpb.Quantity func (q Quantity) TryEqual(input Any) (bool, bool) ``` -------------------------------- ### Create FHIR Bundle Entry for Getting Versioned Resource (VRead Interaction) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/bundle Constructs a FHIR bundle entry for a GET request to retrieve a specific version of a resource (FHIR 'vread' interaction). Suitable for batch/transaction bundles. If the version is empty, it defaults to a simple GET (head version). It does not support history interactions. ```go func NewVersionedGetEntry(typeName resource.Type, id string, version string, opts ...EntryOption) *bcrpb.Bundle_Entry { // ... implementation details ... } ``` -------------------------------- ### Go: ImpliesExpressionContext Structure and Methods Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Defines the ImpliesExpressionContext struct, embedding ExpressionContext. It includes a constructor NewImpliesExpressionContext and methods like Accept, AllExpression to get all child expressions, Expression to get a specific child expression, and GetRuleContext. ```go type ImpliesExpressionContext struct { ExpressionContext } func NewImpliesExpressionContext(parser antlr.Parser, ctx antlr.ParserRuleContext) *ImpliesExpressionContext { return &ImpliesExpressionContext{} } func (s *ImpliesExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { return nil } func (s *ImpliesExpressionContext) AllExpression() []IExpressionContext { return nil } func (s *ImpliesExpressionContext) Expression(i int) IExpressionContext { return nil } func (s *ImpliesExpressionContext) GetRuleContext() antlr.RuleContext { return nil } ``` -------------------------------- ### Create Test QuestionnaireResponse Resource Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/internal/fhirtest Generates a test QuestionnaireResponse resource with predefined fields like subject and status. It accepts optional resource options for further customization. Dependencies include the testing package and qrpb.QuestionnaireResponse. ```go func NewQuestionnaireResponse(t *testing.T, opts ...ResourceOption) *qrpb.QuestionnaireResponse ``` -------------------------------- ### Create Test QuestionnaireResponse Resource (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/internal/fhirtest Generates a test QuestionnaireResponse resource with pre-populated subject and status fields. It accepts optional ResourceOptions for further customization. Errors during test setup will cause the test to fail. ```Go func NewQuestionnaireResponse(t *testing.T, opts ...ResourceOption) *qrpb.QuestionnaireResponse { // ... implementation details ... } ``` -------------------------------- ### Create FHIR Bundle GET Entry (Read Interaction) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.1.0/internal/bundle Constructs a bundle entry for a GET request to retrieve the head version of a FHIR resource, corresponding to the FHIR 'read' interaction. It is designed for batch or transaction bundles. ```go func NewGetEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry { // ... implementation details ... } ``` -------------------------------- ### TypeSpecifierContext Methods in fhirpath_parser.go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.1.0/fhirpath/internal/grammar Details various methods available for the TypeSpecifierContext in fhirpath_parser.go. These include accepting visitors, getting the parser, retrieving the RuleContext, checking if it's a TypeSpecifierContext, getting a QualifiedIdentifier, and converting to a string representation of the rule tree. ```go func (s *TypeSpecifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { // Implementation details would be here panic("implement me") } func (s *TypeSpecifierContext) GetParser() antlr.Parser { // Implementation details would be here panic("implement me") } func (s *TypeSpecifierContext) GetRuleContext() antlr.RuleContext { return s } func (*TypeSpecifierContext) IsTypeSpecifierContext() { // Method body } func (s *TypeSpecifierContext) QualifiedIdentifier() IQualifiedIdentifierContext { // Implementation details would be here panic("implement me") } func (s *TypeSpecifierContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { // Implementation details would be here panic("implement me") } ``` -------------------------------- ### Go: TermContext Initialization and Methods Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Details the TermContext structure and its associated initialization functions. It includes methods for copying context data, retrieving the parser and rule context, checking if it's a TermContext, and converting it to a string representation of the parse tree. These are standard ANTLR context operations. ```go type TermContext struct { antlr.BaseParserRuleContext // contains filtered or unexported fields } ``` ```go func NewEmptyTermContext() *TermContext ``` ```go func NewTermContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *TermContext ``` ```go func (s *TermContext) CopyAll(ctx *TermContext) ``` ```go func (s *TermContext) GetParser() antlr.Parser ``` ```go func (s *TermContext) GetRuleContext() antlr.RuleContext ``` ```go func (*TermContext) IsTermContext() ``` ```go func (s *TermContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string ``` -------------------------------- ### Apply Function Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/internal/bundleopt Applies a set of bundle options to construct a bundle from raw data. ```APIDOC ## func Apply ### Description Applies a set of bundle options to construct a bundle from raw data. ### Method N/A (Function Signature) ### Endpoint N/A (Package Function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```go func Apply(bundle *bcrpb.Bundle, opts ...BundleOption) ``` ### Response #### Success Response (200) N/A (Function returns void, modifies bundle in place) #### Response Example N/A ``` -------------------------------- ### Create FHIR Bundle Entry Functions (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.1.0/internal/bundle_tab=versions Offers functions to create specific types of FHIR Bundle entries, such as entries for creating new resources, updating resources (PUT), deleting resources, performing GET requests, and versioned GET requests. Entry options can be applied. ```Go func NewCollectionEntry(res fhir.Resource) *bcrpb.Bundle_Entry func NewDeleteEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry func NewGetEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry func NewPostEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry func NewPutEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry func NewVersionedGetEntry(typeName resource.Type, id string, version string, opts ...EntryOption) *bcrpb.Bundle_Entry ``` -------------------------------- ### Create a Simple Resolver - Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/fhirpath/resolver/resolvertest_tab=versions Creates a simple resolver for testing purposes. It takes optional configuration options to customize its behavior. This is useful for mocking dependencies in tests. ```go func NewSimpleResolver(opts ...SimpleResolverOption) resolver.Resolver type SimpleResolverOption interface func Entry(key string, resources ...fhirpath.Resource) SimpleResolverOption ``` -------------------------------- ### Create FHIR Bundle Entry Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/bundle Functions for creating individual FHIR Bundle Entries. This includes creating entries for collections, GET requests, POST requests, PUT requests, DELETE requests, and versioned GET requests. These functions take resource details or FHIR resources as input. ```go func NewCollectionEntry(res fhir.Resource) *bcrpb.Bundle_Entry ``` ```go func NewGetEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry ``` ```go func NewPostEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry ``` ```go func NewPutEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry ``` ```go func NewDeleteEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry ``` ```go func NewVersionedGetEntry(typeName resource.Type, id string, version string, opts ...EntryOption) *bcrpb.Bundle_Entry ``` -------------------------------- ### UnitContext Constructor and Methods in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Provides constructors for UnitContext and its associated methods for ANTLR parsing. Includes visitor acceptance (Accept), rule context retrieval (GetRuleContext), parser access (GetParser), and specific getters for DateTimePrecision, PluralDateTimePrecision, and STRING terminal. ```Go type UnitContext struct { antlr.BaseParserRuleContext // contains filtered or unexported fields } func NewEmptyUnitContext() *UnitContext func NewUnitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnitContext func (s *UnitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *UnitContext) DateTimePrecision() IDateTimePrecisionContext func (s *UnitContext) GetParser() antlr.Parser func (s *UnitContext) GetRuleContext() antlr.RuleContext func (s *UnitContext) IsUnitContext() func (s *UnitContext) PluralDateTimePrecision() IPluralDateTimePrecisionContext func (s *UnitContext) STRING() antlr.TerminalNode func (s *UnitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string ``` -------------------------------- ### Go: Create FHIR Bundle Entries Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.1.0/internal/bundle Includes functions for creating specific types of FHIR Bundle Entries, such as collection entries, delete entries, get entries, post entries, put entries, and versioned get entries. These functions facilitate the creation of individual entries within a bundle. ```Go func NewCollectionEntry(res fhir.Resource) *bcrpb.Bundle_Entry NewCollectionEntry takes in a FHIR Resource and creates a BundleEntry for the resource. ``` ```Go func NewDeleteEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry NewDeleteEntry creates a Bundle Entry for a delete operation. ``` ```Go func NewGetEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry NewGetEntry creates a Bundle Entry for a get operation. ``` ```Go func NewPostEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry NewPostEntry creates a Bundle Entry for a post operation. ``` ```Go func NewPutEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry NewPutEntry creates a Bundle Entry for a put operation. ``` ```Go func NewVersionedGetEntry(typeName resource.Type, id string, version string, opts ...EntryOption) *bcrpb.Bundle_Entry NewVersionedGetEntry creates a Bundle Entry for a versioned get operation. ``` -------------------------------- ### Get Function Context in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Retrieves the IFunctionContext from a FunctionInvocationContext. This is a method on the FunctionInvocationContext struct. ```go func (s *FunctionInvocationContext) Function() IFunctionContext { // Implementation details omitted for brevity } ``` -------------------------------- ### Go: Context Initialization and Cloning Functions Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/expr%40v1.3_tab=versions Includes functions for managing the `Context` in Go. `InitializeContext` creates a new context from an input collection, while `Clone` provides a way to duplicate an existing context. These are essential for maintaining state during expression evaluation. ```go type Context struct BeforeLastResult system.Collection ExternalConstants map[string]any LastResult system.Collection Now time.Time func InitializeContext(input system.Collection) *Context func (c *Context) Clone() *Context ``` -------------------------------- ### ApplyOptions Function Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.2.1/fhirpath/internal/opts ApplyOptions applies all the options to the given configuration. ```APIDOC ## ApplyOptions ### Description ApplyOptions applies all the options to the given configuration. ### Method `func` ### Endpoint N/A (Function) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response - `*T` (pointer to generic type) - The configuration with options applied. - `error` - An error if any option fails to apply. #### Response Example ```json { "result": "", "error": "null or error message" } ``` ``` -------------------------------- ### Substring Function Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/fhirpath/internal/funcs/impl Extracts a portion of a string based on start position and optional length. ```APIDOC ## Substring ### Description Extracts a portion of the input string starting from a specified zero-based position. An optional length parameter limits the number of characters returned. ### Method N/A (Function within a library) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **input** (system.Collection) - A collection containing the string from which to extract a substring. - **args** (expr.Expression) - The first expression should be an integer representing the zero-based start position. The second optional expression should be an integer representing the maximum number of characters to return. ### Request Example ```json { "input": ["Programming"], "args": [3, 4] } ``` ### Response #### Success Response (200) - **result** (system.Collection) - A collection containing the extracted substring. #### Response Example ```json { "result": ["gram"] } ``` ``` -------------------------------- ### Create FHIR Bundle Entry for Getting Resource (Read Interaction) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/bundle Constructs a FHIR bundle entry for a GET request to retrieve the head version of a resource (FHIR 'read' interaction). It is designed for batch or transaction bundles. Avoid crafting special IDs for versioned resources; use VersionedGetEntry instead. ```go func NewGetEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry { // ... implementation details ... } ``` -------------------------------- ### Go: Parameter List Context Creation and Methods Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.5.0/fhirpath/internal/grammar Provides functionality for handling parameter lists in FHIRPath expressions. Includes constructors for empty and standard parameter lists, methods for visitor acceptance, expression access, and context retrieval. Uses antlr. ```Go type ParamListContext struct { antlr.BaseParserRuleContext // contains filtered or unexported fields } func NewEmptyParamListContext() *ParamListContext { // Implementation details would be here } func NewParamListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamListContext { // Implementation details would be here } func (s *ParamListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { // Implementation details would be here } func (s *ParamListContext) AllExpression() []IExpressionContext { // Implementation details would be here } func (s *ParamListContext) Expression(i int) IExpressionContext { // Implementation details would be here } func (s *ParamListContext) GetParser() antlr.Parser { // Implementation details would be here } func (s *ParamListContext) GetRuleContext() antlr.RuleContext { // Implementation details would be here } func (*ParamListContext) IsParamListContext() { // Implementation details would be here } func (s *ParamListContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { // Implementation details would be here } ``` -------------------------------- ### Get Identifier List from FHIR Resource Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/internal/resource Retrieves a list of FHIR Identifiers from a given FHIR Resource. It uses duck typing to check if the resource implements methods for getting single or multiple identifiers. Returns an error if the resource does not implement the GetIdentifier() method. Handles cases where identifiers might be missing. ```go func GetIdentifierList(res fhir.Resource) ([]*dtpb.Identifier, error) { return nil, nil } ``` -------------------------------- ### UnitContext Constructors and Methods (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.5.0/fhirpath/internal/grammar Provides documentation for the UnitContext in Go, including constructors and methods such as Accept, DateTimePrecision, GetParser, GetRuleContext, IsUnitContext, PluralDateTimePrecision, STRING, and ToStringTree. This context is used for parsing units in FHIRPath. ```Go type UnitContext struct { antlr.BaseParserRuleContext // contains filtered or unexported fields } func NewEmptyUnitContext() *UnitContext func NewUnitContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *UnitContext func (s *UnitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *UnitContext) DateTimePrecision() IDateTimePrecisionContext func (s *UnitContext) GetParser() antlr.Parser func (s *UnitContext) GetRuleContext() antlr.RuleContext func (s *UnitContext) IsUnitContext() func (s *UnitContext) PluralDateTimePrecision() IPluralDateTimePrecisionContext func (s *UnitContext) STRING() antlr.TerminalNode func (s *UnitContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string ``` -------------------------------- ### Get Status Code From Entry Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.4.0/internal/bundle Returns the numeric http code from Bundle_Entry.response.status. ```APIDOC ## Get Status Code From Entry ### Description Returns the numeric http code from Bundle_Entry.response.status. Added in v1.2.1. ### Method N/A (Function call) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **entry** (*bcrpb.Bundle_Entry) - The bundle entry to process. ### Request Example ```go statusCode, err := StatusCodeFromEntry(entry) ``` ### Response #### Success Response (200) - **int** - The numeric HTTP status code. - **error** - An error if the status code cannot be determined. #### Response Example ```json { "int": 200, "error": null } ``` ``` -------------------------------- ### Apply Function Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/bundleopt The Apply function applies a series of bundle options to a given bundle. ```APIDOC ## Apply ### Description Applies a series of bundle options to a given bundle. ### Method func ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Go: Get Identity ID Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.5.0/internal/resource Returns the ID part of the Identity object. ```Go func (i *Identity) ID() string { // Implementation for ID() method } ``` -------------------------------- ### StartsWith Function Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/fhirpath/internal/funcs/impl Checks if an input string begins with a specified prefix. Returns a boolean value indicating the result. ```APIDOC ## StartsWith ### Description Returns true if the input string starts with the given prefix. ### Method N/A (Function within a library) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Take Function Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/fhirpath/internal/funcs/impl Returns the first 'n' items from a collection. ```APIDOC ## Take ### Description Returns a new collection containing the first 'num' items from the input collection, or fewer if the collection has less than 'num' items. If 'num' is less than or equal to zero, or if the input collection is empty, an empty collection is returned. ### Method N/A (Function within a library) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body - **input** (system.Collection) - The input collection from which to take items. - **args** (expr.Expression) - The first expression should be an integer representing the number of items to take. ### Request Example ```json { "input": [1, 2, 3, 4, 5], "args": [3] } ``` ### Response #### Success Response (200) - **result** (system.Collection) - A collection containing the first specified number of items. #### Response Example ```json { "result": [1, 2, 3] } ``` ### FHIRPath Documentation [https://hl7.org/fhirpath/N1/#takenum-integer-collection](https://hl7.org/fhirpath/N1/#takenum-integer-collection) ``` -------------------------------- ### Get Parser for DateTime Precision Context in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.2.1/fhirpath/internal/grammar Retrieves the antlr.Parser associated with the DateTimePrecisionContext. ```Go func (s *DateTimePrecisionContext) GetParser() antlr.Parser ``` -------------------------------- ### ProgContext Structure and Methods (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Details the ProgContext, inheriting from antlr.BaseParserRuleContext. This context represents a program structure and includes methods for creation, visitor acceptance, and retrieving the parser, rule context, and EOF terminal. It also contains a method to verify if it is a ProgContext and to generate a string representation of its parse tree. ```Go type ProgContext struct { antlr.BaseParserRuleContext // contains filtered or unexported fields } func NewEmptyProgContext() *ProgContext func NewProgContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgContext func (s *ProgContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *ProgContext) EOF() antlr.TerminalNode func (s *ProgContext) Expression() IExpressionContext func (s *ProgContext) GetParser() antlr.Parser func (s *ProgContext) GetRuleContext() antlr.RuleContext func (*ProgContext) IsProgContext() func (s *ProgContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string ``` -------------------------------- ### Time Utility Functions Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/fhirpath/system Utility functions for Time objects, such as getting the type name and string representation. ```APIDOC ## Name ### Description Name returns the type name. ### Method N/A (This is a method on the Time object, not a standalone endpoint) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **string** (string) - The name of the type. #### Response Example N/A ## String ### Description String formats the time as a time string. ### Method N/A (This is a method on the Time object, not a standalone endpoint) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **string** (string) - The formatted time string. #### Response Example N/A ``` -------------------------------- ### Accept Visitor Pattern Implementation in Go (ANTLR) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.3.0/fhirpath/internal/grammar Demonstrates the implementation of the Accept method for various ANTLR-generated context types in Go. This method is crucial for the visitor design pattern, allowing traversal and processing of the parse tree. ```go func (s *TimeLiteralContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *TotalInvocationContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *TypeExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *TypeSpecifierContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *UnionExpressionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *UnitContext) Accept(visitor antlr.ParseTreeVisitor) interface{} ``` -------------------------------- ### Bundle Entry Creation Functions (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/bundle_tab=versions Provides functions to create different types of FHIR Bundle entries, such as POST, PUT, DELETE, GET, and versioned GET entries. These functions utilize `EntryOption` to configure entry-specific details like conditional URLs or match headers. Dependencies include `resource.Type`, `EntryOption`, and potentially `fhir.Resource` for entry content. ```go func NewPostEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry + func NewPutEntry(res fhir.Resource, opts ...EntryOption) *bcrpb.Bundle_Entry + func NewDeleteEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry + func NewGetEntry(typeName resource.Type, id string, opts ...EntryOption) *bcrpb.Bundle_Entry + func NewVersionedGetEntry(typeName resource.Type, id string, version string, opts ...EntryOption) *bcrpb.Bundle_Entry ``` -------------------------------- ### Get Resource ID from Identity (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.5.0/internal/resource Retrieves the resource ID from an Identity object. ```go func (i *Identity) ID() string { // ... implementation details ... } ``` -------------------------------- ### NewProgContext Constructor Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/fhirpath/internal/grammar Constructs a new ProgContext with a given parser, parent rule context, and invoking state. This is the standard way to create a ProgContext during parsing. ```go func NewProgContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgContext ``` -------------------------------- ### Date and Trace Functions Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.5.0/fhirpath/internal/funcs/impl Functions for getting the current date and custom diagnostic logging. ```APIDOC ## Today ### Description Returns the current date as a system.Date object. ### Method Not Applicable (Function) ### Endpoint Not Applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "message": "Get today's date" } ``` ### Response #### Success Response (200) - **output** (Date) - The current date. #### Response Example ```json { "output": "2023-10-27" } ``` ## Trace ### Description Implements the FHIRPath "trace" function for custom diagnostic logging during evaluation. ### Method Not Applicable (Function) ### Endpoint Not Applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "expression": "Patient.name", "logName": "patientNameTrace" } ``` ### Response #### Success Response (200) - **output** (Collection) - The result of the evaluated expression. #### Response Example ```json { "output": [ { "text": "John Doe" } ] } ``` ``` -------------------------------- ### Create Identity with New Version Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/resource Returns a new Identity object with the specified VersionID. ```go func (i *Identity) WithNewVersion(versionID string) *Identity ``` -------------------------------- ### ParamListContext Constructors and Methods (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/fhirpath/internal/grammar Defines constructors for creating ParamListContext objects, both empty and with specified parser and parent rule context. Includes methods to accept visitors and retrieve all or specific Expression child contexts. ```go func NewEmptyParamListContext() *ParamListContext func NewParamListContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ParamListContext func (s *ParamListContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *ParamListContext) AllExpression() []IExpressionContext func (s *ParamListContext) Expression(i int) IExpressionContext ``` -------------------------------- ### Get Rule Context for DateTime Precision Context in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.2.1/fhirpath/internal/grammar Retrieves the underlying antlr.RuleContext for a DateTimePrecisionContext. ```Go func (s *DateTimePrecisionContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### FHIRPath Context Management (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.2.1/fhirpath/internal/expr_tab=versions Demonstrates the creation and manipulation of the Context object in the fhirpath-go library. This includes initializing a new context, cloning an existing one, and accessing context-specific values. ```Go type Context BeforeLastResult system.Collection ExternalConstants map[string]any LastResult system.Collection Now time.Time func InitializeContext(input system.Collection) *Context func (c *Context) Clone() *Context func (c *Context) Deadline() (deadline time.Time, ok bool) func (c *Context) Done() <-chan struct{} func (c *Context) Err() error func (c *Context) Value(key any) any ``` -------------------------------- ### Get FHIR Resource ID from Identity Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/resource Returns the resource ID from an Identity object. ```go func (i *Identity) ID() string ``` -------------------------------- ### QuantityContext Methods and Constructors (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.4.0/fhirpath/internal/grammar Defines constructors and methods for the QuantityContext, including creating empty or new contexts, accepting visitors, retrieving the parser and rule context, checking if it's a QuantityContext, accessing NUMBER terminals, converting to a string tree, and getting the Unit. These are generated by ANTLR. ```Go func NewEmptyQuantityContext() *QuantityContext ``` ```Go func NewQuantityContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *QuantityContext ``` ```Go func (s *QuantityContext) Accept(visitor antlr.ParseTreeVisitor) interface{} ``` ```Go func (s *QuantityContext) GetParser() antlr.Parser ``` ```Go func (s *QuantityContext) GetRuleContext() antlr.RuleContext ``` ```Go func (*QuantityContext) IsQuantityContext() ``` ```Go func (s *QuantityContext) NUMBER() antlr.TerminalNode ``` ```Go func (s *QuantityContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string ``` ```Go func (s *QuantityContext) Unit() IUnitContext ``` -------------------------------- ### Get URI of ContainedResource as string (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/containedresource Returns the URI of a contained resource as a string. The format is Type/ID. ```Go func URIString(cr *bcrpb.ContainedResource) string { // ... implementation ... } // Example Usage: // resourceURIString := URIString(containedResource) ``` -------------------------------- ### Go: PluralDateTimePrecisionContext Methods Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Includes standard ANTLR methods like Accept and GetRuleContext, along with specific methods like GetParser, IsPluralDateTimePrecisionContext, and ToStringTree for the PluralDateTimePrecisionContext. ```go func (s *PluralDateTimePrecisionContext) Accept(visitor antlr.ParseTreeVisitor) interface{} { // ... implementation details ... } func (s *PluralDateTimePrecisionContext) GetParser() antlr.Parser { // ... implementation details ... } func (s *PluralDateTimePrecisionContext) GetRuleContext() antlr.RuleContext { // ... implementation details ... } func (*PluralDateTimePrecisionContext) IsPluralDateTimePrecisionContext() { // ... implementation details ... } func (s *PluralDateTimePrecisionContext) ToStringTree(ruleNames []string, recog antlr.Recognizer) string { // ... implementation details ... } ``` -------------------------------- ### Create FHIR Bundle Transactions and Entries in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.4.0/internal/bundle_tab=versions This Go code snippet demonstrates how to create different types of FHIR Bundles, such as transaction, batch, collection, and searchset, using the Verily FHIRPath Go module. It also shows how to create individual bundle entries, including delete, get, post, put, and versioned get entries, with various configuration options. ```go import ( "errors" "fmt" "time" "github.com/Verily-src/fhir-go/fhir" "github.com/Verily-src/fhir-go/fhir/bundle" "github.com/Verily-src/fhir-go/fhir/bundle/bundleopt" cpb "github.com/Verily-src/fhir-go/fhir/proto/coding/codes" dtpb "github.com/Verily-src/fhir-go/fhir/proto/datatypes" "github.com/Verily-src/fhir-go/fhir/proto/resource" bcrpb "github.com/Verily-src/fhir-go/fhir/proto/resource/bundle" ) // Example usage of functions to create FHIR Bundles and Entries // Create a new transaction bundle transactionBundle := bundle.NewTransaction(bundle.WithEntries( bundle.NewPostEntry(fhir.Resource{Type: "Patient", ID: "123"}), bundle.NewPutEntry(fhir.Resource{Type: "Observation", ID: "456"}), )) // Create a new batch bundle batchBundle := bundle.NewBatch() // Create a new collection bundle collectionBundle := bundle.NewCollection() // Create a new searchset bundle searchsetBundle := bundle.NewSearchset() // Create a new transaction response bundle transactionResponse := bundle.NewTransactionResponse() // Create a new delete entry deleteEntry := bundle.NewDeleteEntry("Patient", "789") // Create a new get entry getEntry := bundle.NewGetEntry("Observation", "1011") // Create a new post entry with options postEntry := bundle.NewPostEntry(fhir.Resource{Type: "Practitioner", ID: "1213"}, bundle.WithGeneratedFullURL()) // Create a new put entry with options putEntry := bundle.NewPutEntry(fhir.Resource{Type: "Medication", ID: "1415"}, bundle.WithIfNoneExist(&dtpb.Identifier{})) // Create a new versioned get entry versionedGetEntry := bundle.NewVersionedGetEntry("AllergyIntolerance", "1617", "v1") // Patch an entry from bytes identity := &resource.Identity{} payload := []byte("some payload") patchEntry, err := bundle.PatchEntryFromBytes(identity, payload) if err != nil { // Handle error } // Set entry if match // bundle.SetEntryIfMatch(entry) // Example of Option interface options := []bundle.Option{ bundle.WithEntries( bundle.NewCollectionEntry(fhir.Resource{Type: "Encounter", ID: "1819"}), ), bundle.WithTimestampNow(), } // Use options to create a bundle newBundleWithOptions := bundle.New("collection", options...) ``` -------------------------------- ### Go: ParamListContext Get RuleContext Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Returns the ANTLR RuleContext for this ParamListContext. This provides access to the underlying ANTLR parsing context. ```go func (s *ParamListContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### Create New Identity Version (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/internal/resource%40v1.2 The WithNewVersion function returns a new Identity object with a specified VersionID. It takes a string representing the version ID as input and returns a pointer to an Identity object. ```Go func (i *Identity) WithNewVersion(versionID string) *Identity { // Implementation details omitted for brevity return i } ``` -------------------------------- ### Go: OrExpressionContext Get RuleContext Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Returns the ANTLR RuleContext for this OrExpressionContext, providing access to the underlying ANTLR parsing information. ```go func (s *OrExpressionContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### ProgContext Constructor and Methods (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/fhirpath/internal/grammar Defines constructors for ProgContext and methods for accepting visitors, accessing the EOF terminal node and the Expression child context, and retrieving the parser and ANTLR RuleContext. ```go func NewEmptyProgContext() *ProgContext func NewProgContext(parser antlr.Parser, parent antlr.ParserRuleContext, invokingState int) *ProgContext func (s *ProgContext) Accept(visitor antlr.ParseTreeVisitor) interface{} func (s *ProgContext) EOF() antlr.TerminalNode func (s *ProgContext) Expression() IExpressionContext func (s *ProgContext) GetParser() antlr.Parser func (s *ProgContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### Go: NumberLiteralContext Get RuleContext Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Returns the ANTLR RuleContext for this NumberLiteralContext, providing access to the underlying ANTLR parsing information. ```go func (s *NumberLiteralContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### String StartsWith Function in Go Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/fhirpath/internal/funcs/impl The StartsWith function checks if an input string begins with a specified prefix. It takes a context, input collection, and a variable number of expressions as arguments. It returns a collection and an error. ```go func StartsWith(ctx *expr.Context, input system.Collection, args ...expr.Expression) (system.Collection, error) ``` -------------------------------- ### Go: NullLiteralContext Get RuleContext Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Returns the ANTLR RuleContext for this NullLiteralContext, providing access to the underlying ANTLR parsing information. ```go func (s *NullLiteralContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### Create Test ResearchSubject Resource (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/internal/fhirtest Generates a test ResearchSubject resource with default values for individual, status ('ELIGIBLE'), and study. Customizations can be provided via ResourceOptions. Test setup errors result in test failure. ```Go func NewResearchSubject(t *testing.T, opts ...ResourceOption) *rsubpb.ResearchSubject { // ... implementation details ... } ``` -------------------------------- ### Go: MultiplicativeExpressionContext Get RuleContext Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath/internal/grammar Returns the ANTLR RuleContext for this MultiplicativeExpressionContext, providing access to the underlying ANTLR parsing information. ```go func (s *MultiplicativeExpressionContext) GetRuleContext() antlr.RuleContext ``` -------------------------------- ### FHIR Resource Test Dummies and Utilities (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/fhirtest Provides functions to generate pseudo-randomized FHIR resource identities, construct new resources at runtime, and emulate Meta updates for R4 FHIR Protos. It organizes resources by interface abstractions and keys them by resource name. ```go package fhirtest import ( "testing" "github.com/verily-src/fhir-go/fhir" "github.com/verily-src/fhir-go/fhir/resource" "google.golang.org/protobuf/proto" "github.com/verily-src/fhir-go/fhir/datatypes_go_proto" ) var ( // Elements is a map of all element-names to an instance of that element type. // // The elements in this map are not guaranteed to contain any specific value; // it is only guaranteed to contain a non-nil instance of a concrete element // of the associated name. Elements map[string]fhir.Element // BackboneElements is a map of all backbone element-names to an instance of // that element type. // // The elements in this map are not guaranteed to contain any specific value; // it is only guaranteed to contain a non-nil instance of a concrete backbone // element of the associated name. BackboneElements map[string]fhir.BackboneElement ) var CanonicalResources map[string]fhir.CanonicalResource var DomainResources map[string]fhir.DomainResource var MetadataResources map[string]fhir.MetadataResource var Resources map[string]fhir.Resource // NewResource creates a dummy resource object for the purposes of testing of type `resourceType`. // If `resourceType` does not name a valid R4 FHIR resource, this will fail the calling test. func NewResource(t *testing.T, resourceType resource.Type, opts ...ResourceOption) fhir.Resource // NewResourceFromBase returns a copy of a resource modified by given options. The input resource remains unmodified. // Useful for tweaking an existing resource for test inputs. func NewResourceFromBase(t *testing.T, resource fhir.Resource, opts ...ResourceOption) fhir.Resource // NewResourceOf creates a dummy resource object for the purposes of testing of type `T`. // If `T` is not a valid FHIR R4 resource, this will fail testing. func NewResourceOf[T fhir.Resource](t *testing.T, opts ...ResourceOption) T // ReplaceMeta is deprecated and should use the production one in "github.com/verily-src/fhirpath-go/internal/element/meta". func ReplaceMeta(resource fhir.Resource, m *datatypes_go_proto.Meta) // StableRandomMeta generates a stable, pseudo-random Meta object. func StableRandomMeta() *datatypes_go_proto.Meta // TouchMeta updates the lastUpdated timestamp of a FHIR resource. func TouchMeta(resource fhir.Resource) // UpdateID updates the logical ID of a FHIR resource. func UpdateID(resource fhir.Resource, resourceID string) // UpdateMeta updates the versionID and lastUpdated timestamp of a FHIR resource. func UpdateMeta(resource fhir.Resource, versionID string, updateTime time.Time) // ResourceOption is an interface for configuring FHIR resources during creation or modification. type ResourceOption interface { // Apply applies the option to the given resource. Apply(resource fhir.Resource) } // WithCodeField sets a code field on the resource. func WithCodeField(field, value string) ResourceOption // WithGeneratedIdentifier sets a generated identifier for the resource. func WithGeneratedIdentifier(system string) ResourceOption // WithJSONField sets a JSON field on the resource. func WithJSONField(field, value string) ResourceOption // WithProtoField sets a proto field on the resource. func WithProtoField(field string, message proto.Message) ResourceOption // WithRepeatedProtoField sets a repeated proto field on the resource. func WithRepeatedProtoField(field string, messages ...proto.Message) ResourceOption // WithResourceModification applies a custom modification function to a resource. func WithResourceModification[T fhir.Resource](modifier func(T)) ResourceOption ``` -------------------------------- ### Create Dummy FHIR Resource for Testing (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/internal/fhirtest Creates a dummy FHIR resource of a specified R4 type for testing. If the provided resource type is not a valid R4 FHIR resource, the calling test will fail. It accepts optional ResourceOptions. ```Go func NewResource(t *testing.T, resourceType resource.Type, opts ...ResourceOption) fhir.Resource { // ... implementation details ... } ``` -------------------------------- ### Expression String Representation Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/fhirpath%40v1.5_tab=versions Provides a method to get the string representation of a compiled FHIRPath expression. ```APIDOC ## String ### Description Returns the original FHIRPath expression string that was used to compile this `Expression` object. ### Method `(*Expression) String` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```go // Assuming 'expr' is a compiled *fhirpath.Expression originalExpr := expr.String() // originalExpr now holds the FHIRPath string, e.g., "Patient.name.given" ``` ### Response #### Success Response (String) - **string** (`string`) - The original FHIRPath expression string. ``` -------------------------------- ### Get Relative URI String from Identity Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/resource Returns a string representation of the relative URI for convenience. ```go func (i *Identity) RelativeURIString() string ``` -------------------------------- ### Create a Simple Resolver (Go) Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.4.0/fhirpath/resolver/resolvertest_tab=versions Provides a function to create a simple resolver with optional configurations. The 'Entry' function allows specifying a key and resources for the resolver. ```Go func NewSimpleResolver(opts ...SimpleResolverOption) resolver.Resolver func Entry(key string, resources ...fhirpath.Resource) SimpleResolverOption ``` -------------------------------- ### Get FHIR Resource Version ETag Source: https://pkg.go.dev/github.com/verily-src/fhirpath-go/%40v1.0.0/internal/resource Retrieves the ETag associated with the version of a FHIR resource. ```Go func VersionETag(r fhir.Resource) string ```