Documentation
¶
Index ¶
- func BuildSourceURL(baseURL string, parts ...string) (string, error)
- func ClientConfig() *fhirclient.Config
- func FilterIdentifiersBySystem(identifiers []fhir.Identifier, system string) []fhir.Identifier
- func IDFromReference(ref string, resourceType string) string
- func ReferencesType(ref string, resourceType string) bool
- func TokenToIdentifier(token string) (*fhir.Identifier, error)
- func VisitBundleResources[ResType any](bundle *fhir.Bundle, visitor func(resource *ResType) error) error
- type ResourceInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSourceURL ¶
BuildSourceURL constructs a consistent FHIR source URL from a base URL and resource reference. This ensures all _source URL construction follows the same pattern throughout the application. Examples:
- BuildSourceURL("https://example.com/fhir", "Organization/123") -> "https://example.com/fhir/Organization/123"
- BuildSourceURL("https://example.com/fhir/", "Patient", "456") -> "https://example.com/fhir/Patient/456"
func ClientConfig ¶
func ClientConfig() *fhirclient.Config
func FilterIdentifiersBySystem ¶ added in v0.4.0
func FilterIdentifiersBySystem(identifiers []fhir.Identifier, system string) []fhir.Identifier
func IDFromReference ¶ added in v0.8.0
func ReferencesType ¶ added in v0.8.0
func TokenToIdentifier ¶
func TokenToIdentifier(token string) (*fhir.Identifier, error)
TokenToIdentifier converts a FHIR search token ("system|value") to a FHIR Identifier. If the token is empty or not in the correct format, an error is returned.
Types ¶
type ResourceInfo ¶
ResourceInfo contains common FHIR resource fields extracted from JSON
func ExtractResourceInfo ¶
func ExtractResourceInfo(resourceJSON []byte) (*ResourceInfo, error)
ExtractResourceInfo extracts common FHIR resource fields from JSON bytes. This is a generic utility for parsing any FHIR resource to get basic metadata without requiring knowledge of the specific resource type.
Click to show internal directories.
Click to hide internal directories.