Skip to content

Commit

Permalink
Update README.md to use correct options - Project import generated by…
Browse files Browse the repository at this point in the history
… Copybara. (#8)

Updating the README.md to use the renamed option functions.

GitOrigin-RevId: bd920333d9aeaedd621d3e753eb999a408963eb1

Co-authored-by: Copybara <[email protected]>
  • Loading branch information
VickSuresh and Copybara authored Jun 7, 2024
1 parent fd7f001 commit f8b3671
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# FHIRPath

Developed and maintained by the nice folks at [Verily](https://verily.com/).

This package contains a Go implementation of the [FHIRPath][fhirpath] specification, implemented directly with
the [google/fhir][google-fhir] proto definitions.

Expand Down Expand Up @@ -60,7 +62,7 @@ customFn := func (input system.Collection, args ...any) (system.Collection error
fmt.Print("called custom fn")
return input, nil
}
expression, err := fhirpath.Compile("print()", WithFunction("print", customFn))
expression, err := fhirpath.Compile("print()", compopts.AddFunction("print", customFn))
```

#### To add external constants
Expand All @@ -72,7 +74,7 @@ The constraints on external constants are as follows:

```go
customVar := system.String("custom variable")
result, err := expression.Evaluate([]fhir.Resource{someResource}, WithConstant("var", customVar))
result, err := expression.Evaluate([]fhir.Resource{someResource}, evalopts.EnvVariable("var", customVar))
```

### System Types
Expand Down

0 comments on commit f8b3671

Please sign in to comment.