moonbit-fhir

    MoonBit-native FHIR R4/R5 JSON validation, profiles, NDJSON, Bundle analytics, terminology, privacy, and CLI workflows.

    fhir
    healthcare
    json
    interoperability
    validation
    ndjson
    terminology
    Download zip
    Version
    0.2.1
    License
    Apache-2.0
    Last updated
    2 months ago
    Downloads
    35

    No dependencies

    #moonbit-fhir

    MoonBit-native FHIR JSON validation and interoperability utilities.

    #Quick start

    moon check --deny-warn moon test --deny-warn moon run cmd/main -- --example patient moon run cmd/main -- --json '{"resourceType":"Observation","status":"final","code":{"text":"heart rate"}}'

    #API

    The root package provides resource validation, Bundle and NDJSON processing, path queries, profile and terminology rules, canonicalization, privacy transforms, metrics, and deterministic benchmark fixtures.

    ///|
    test "validate an Observation" {
    let value = parse_json(example_observation_json()).unwrap()
    inspect(is_valid(value), content="true")
    }

    See README.md for architecture, CLI commands, benchmark methodology, CI, and repository layout.

    AllergyIntoleranceSummary

    pub(all) struct AllergyIntoleranceSummary {
    id : String?
    clinical_status : String?
    verification_status : String?
    code_text : String?
    patient : String?
    } derive(Eq, ToJson,
    Debug
    )

    BatchQuality

    pub(all) struct BatchQuality {
    total : Int
    valid : Int
    invalid : Int
    warning_resources : Int
    duplicate_ids : Int
    empty_resources : Int
    type_counts : Map[String, Int]
    issue_counts : Map[String, Int]
    } derive(Eq, ToJson,
    Debug
    )

    BenchmarkCase

    pub(all) struct BenchmarkCase {
    name : String
    records : Int
    payload_bytes : Int
    operation : String
    } derive(Eq, ToJson,
    Debug
    )

    BenchmarkObservation

    pub(all) struct BenchmarkObservation {
    name : String
    input_size : Int
    output_size : Int
    valid_count : Int
    elapsed_units : Int
    } derive(Eq, ToJson,
    Debug
    )

    BulkChunk

    pub(all) struct BulkChunk {
    index : Int
    resources : Array[Json]
    first_id : String?
    last_id : String?
    } derive(Eq, ToJson,
    Debug
    )

    BundleAnalytics

    pub(all) struct BundleAnalytics {
    total_entries : Int
    resource_count : Int
    unique_ids : Int
    duplicate_ids : Array[String]
    type_counts : Map[String, Int]
    references : Array[String]
    broken_references : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    BundleEntry

    pub(all) struct BundleEntry {
    full_url : String?
    resource_type : String
    id : String?
    } derive(Eq, ToJson,
    Debug
    )

    BundleGraph

    pub(all) struct BundleGraph {
    nodes : Int
    edges : Int
    dangling : Int
    node_keys : Array[String]
    edge_list : Array[GraphEdge]
    } derive(Eq, ToJson,
    Debug
    )

    BundleValidation

    pub(all) struct BundleValidation {
    bundle_type : String
    entry_count : Int
    resource_count : Int
    missing_resource_entries : Int
    duplicate_ids : Int
    unsupported_resources : Int
    issues : Array[Issue]
    } derive(Eq, ToJson,
    Debug
    )

    CarePlanSummary

    pub(all) struct CarePlanSummary {
    id : String?
    status : String?
    intent : String?
    title : String?
    subject : String?
    } derive(Eq, ToJson,
    Debug
    )

    CodeRule

    pub(all) struct CodeRule {
    system : String?
    code : String
    display : String?
    } derive(Eq, ToJson,
    Debug
    )

    CodingRecord

    pub(all) struct CodingRecord {
    system : String?
    code : String?
    display : String?
    version : String?
    user_selected : Bool?
    } derive(Eq, ToJson,
    Debug
    )

    CommonResourceSummary

    pub(all) struct CommonResourceSummary {
    resource_type : String
    id : String?
    status : String?
    display : String?
    subject : String?
    date : String?
    } derive(Eq, ToJson,
    Debug
    )

    ConditionSummary

    pub(all) struct ConditionSummary {
    id : String?
    code_text : String?
    clinical_status : String?
    subject : String?
    } derive(Eq, ToJson,
    Debug
    )

    ConstraintKind

    pub(all) enum ConstraintKind {
    Required
    Type
    Date
    Reference
    NonEmpty
    } derive(Eq, ToJson,
    Debug
    )

    ConstraintSet

    pub(all) struct ConstraintSet {
    name : String
    constraints : Array[ResourceConstraint]
    } derive(Eq, ToJson,
    Debug
    )

    ConstraintSet::new

    fn ConstraintSet::new(name : String, constraints : Array[ResourceConstraint]) -> ConstraintSet

    DatePrecision

    pub(all) enum DatePrecision {
    Year
    Month
    Day
    DateTime
    Unknown
    } derive(Eq, ToJson,
    Debug
    )

    DiagnosticReportSummary

    pub(all) struct DiagnosticReportSummary {
    id : String?
    status : String?
    code_text : String?
    subject : String?
    result_count : Int
    } derive(Eq, ToJson,
    Debug
    )

    EncounterSummary

    pub(all) struct EncounterSummary {
    id : String?
    status : String?
    class_code : String?
    subject : String?
    } derive(Eq, ToJson,
    Debug
    )

    ExportFormat

    pub(all) enum ExportFormat {
    Json
    Ndjson
    Csv
    } derive(Eq, ToJson,
    Debug
    )

    ExportOptions

    pub(all) struct ExportOptions {
    format : ExportFormat
    include_header : Bool
    canonical : Bool
    redact : Bool
    } derive(Eq, ToJson,
    Debug
    )

    ExportOptions::csv

    ExportOptions::json

    ExportOptions::ndjson

    FhirService

    pub(all) struct FhirService {
    options : ProcessingOptions
    catalog : TerminologyCatalog
    } derive(Eq, ToJson,
    Debug
    )

    FhirService::bundle_report

    fn FhirService::bundle_report(_self : FhirService, bundle : Json) -> BundleValidation

    FhirService::default

    fn FhirService::default() -> FhirService

    FhirService::export_data

    fn FhirService::export_data(_self : FhirService, values : Array[Json], options : ExportOptions) -> String

    FhirService::graph

    fn FhirService::graph(_self : FhirService, bundle : Json) -> BundleGraph

    FhirService::metadata

    fn FhirService::metadata(_self : FhirService, kind : String) -> ResourceMetadata

    FhirService::new

    FhirService::quality

    fn FhirService::quality(_self : FhirService, values : Array[Json]) -> BatchQuality

    FhirService::query

    fn FhirService::query(_self : FhirService, value : Json, expression : String) -> Array[Json]

    FhirService::redact

    fn FhirService::redact(_self : FhirService, value : Json, policy : PrivacyPolicy) -> Json

    FhirService::schema

    fn FhirService::schema(self : FhirService, kind : String) -> ResourceSchema

    FhirService::search

    fn FhirService::search(_self : FhirService, values : Array[Json], query : String) -> Array[Json]

    FhirService::strict

    fn FhirService::strict() -> FhirService

    FhirService::summarize

    fn FhirService::summarize(self : FhirService, values : Array[Json]) -> String

    FhirService::terminology_contains

    fn FhirService::terminology_contains(self : FhirService, set_name : String, code : String) -> Bool

    FhirService::validate

    fn FhirService::validate(self : FhirService, value : Json) -> ValidationReport

    FhirService::validate_many

    fn FhirService::validate_many(self : FhirService, values : Array[Json]) -> ProcessingResult

    FhirService::validate_ndjson

    fn FhirService::validate_ndjson(self : FhirService, text : String) -> ProcessingResult

    FhirVersion

    pub(all) enum FhirVersion {
    R4
    R5
    } derive(Eq, ToJson,
    Debug
    )

    FhirVersion::to_string

    fn FhirVersion::to_string(self : FhirVersion) -> String

    GraphEdge

    pub(all) struct GraphEdge {
    from : String
    to : String
    reference : String
    } derive(Eq, ToJson,
    Debug
    )

    ImmunizationSummary

    pub(all) struct ImmunizationSummary {
    id : String?
    status : String?
    vaccine_text : String?
    patient : String?
    occurrence : String?
    } derive(Eq, ToJson,
    Debug
    )

    Issue

    pub(all) struct Issue {
    path : String
    code : String
    message : String
    severity : String
    } derive(Eq, ToJson,
    Debug
    )

    MeasurementStats

    pub(all) struct MeasurementStats {
    count : Int
    missing : Int
    minimum : Double
    maximum : Double
    sum : Double
    mean : Double
    units : Map[String, Int]
    } derive(Eq, ToJson,
    Debug
    )

    MedicationRequestSummary

    pub(all) struct MedicationRequestSummary {
    id : String?
    status : String?
    intent : String?
    medication_text : String?
    subject : String?
    } derive(Eq, ToJson,
    Debug
    )

    MedicationSummary

    pub(all) struct MedicationSummary {
    id : String?
    code_text : String?
    status : String?
    form_text : String?
    } derive(Eq, ToJson,
    Debug
    )

    NdjsonLineError

    pub(all) struct NdjsonLineError {
    line : Int
    message : String
    raw : String
    } derive(Eq, ToJson,
    Debug
    )

    NdjsonReport

    pub(all) struct NdjsonReport {
    total_lines : Int
    blank_lines : Int
    valid_lines : Int
    invalid_lines : Int
    resources : Array[Json]
    errors : Array[NdjsonLineError]
    } derive(Eq, ToJson,
    Debug
    )

    NdjsonReport::is_clean

    fn NdjsonReport::is_clean(self : NdjsonReport) -> Bool

    NdjsonReport::success_rate

    fn NdjsonReport::success_rate(self : NdjsonReport) -> Int

    NdjsonStatistics

    pub(all) struct NdjsonStatistics {
    resource_count : Int
    valid_count : Int
    invalid_count : Int
    blank_count : Int
    type_counts : Map[String, Int]
    issue_counts : Map[String, Int]
    } derive(Eq, ToJson,
    Debug
    )

    ObservationPoint

    pub(all) struct ObservationPoint {
    id : String?
    code : String?
    subject : String?
    issued : String?
    value : Double?
    unit : String?
    } derive(Eq, ToJson,
    Debug
    )

    ObservationSummary

    pub(all) struct ObservationSummary {
    id : String?
    status : String?
    code_text : String?
    subject : String?
    value : String?
    issued : String?
    } derive(Eq, ToJson,
    Debug
    )

    OperationOutcome

    pub(all) struct OperationOutcome {
    resource_type : String
    issues : Array[OperationOutcomeIssue]
    } derive(Eq, ToJson,
    Debug
    )

    OperationOutcomeIssue

    pub(all) struct OperationOutcomeIssue {
    severity : String
    code : String
    diagnostics : String
    location : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    OperationResult

    pub(all) struct OperationResult {
    success : Bool
    resource : Json
    issues : Array[Issue]
    } derive(Eq, ToJson,
    Debug
    )

    PatientSummary

    pub(all) struct PatientSummary {
    id : String?
    display_name : String?
    gender : String?
    birth_date : String?
    } derive(Eq, ToJson,
    Debug
    )

    PrivacyAudit

    pub(all) struct PrivacyAudit {
    resource_type : String
    found_sensitive_fields : Array[String]
    removed_fields : Array[String]
    retained_fields : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    PrivacyPolicy

    pub(all) struct PrivacyPolicy {
    name : String
    sensitive_fields : Array[String]
    restricted_fields : Array[String]
    preserve_resource_type : Bool
    preserve_id : Bool
    } derive(Eq, ToJson,
    Debug
    )

    PrivacyPolicy::field_count

    fn PrivacyPolicy::field_count(self : PrivacyPolicy) -> Int

    PrivacyPolicy::name

    fn PrivacyPolicy::name(self : PrivacyPolicy) -> String

    PrivacyPolicy::standard

    fn PrivacyPolicy::standard() -> PrivacyPolicy

    PrivacyPolicy::strict

    ProcedureSummary

    pub(all) struct ProcedureSummary {
    id : String?
    status : String?
    code_text : String?
    subject : String?
    performed : String?
    } derive(Eq, ToJson,
    Debug
    )

    ProcessingOptions

    pub(all) struct ProcessingOptions {
    version : FhirVersion
    profile : Profile?
    privacy_policy : PrivacyPolicy?
    reject_warnings : Bool
    } derive(Eq, ToJson,
    Debug
    )

    ProcessingOptions::default

    ProcessingOptions::strict

    ProcessingResult

    pub(all) struct ProcessingResult {
    reports : Array[ValidationReport]
    accepted : Array[Json]
    rejected : Array[Json]
    redacted : Array[Json]
    quality : BatchQuality
    } derive(Eq, ToJson,
    Debug
    )

    Profile

    pub(all) struct Profile {
    name : String
    rules : Array[ProfileRule]
    } derive(Eq, ToJson,
    Debug
    )

    Profile::name

    fn Profile::name(self : Profile) -> String

    Profile::new

    fn Profile::new(name : String, rules : Array[ProfileRule]) -> Profile

    Profile::rule_count

    fn Profile::rule_count(self : Profile) -> Int

    ProfileRule

    pub(all) enum ProfileRule {
    Required(String)
    Type(String, String)
    Allowed(String, Array[String])
    MinItems(String, Int)
    } derive(Eq, ToJson,
    Debug
    )

    ProvenanceActor

    pub(all) struct ProvenanceActor {
    role : String?
    reference : String?
    display : String?
    } derive(Eq, ToJson,
    Debug
    )

    QualityFinding

    pub(all) struct QualityFinding {
    rule : String
    severity : String
    path : String
    message : String
    score : Int
    } derive(Eq, ToJson,
    Debug
    )

    QueryResult

    pub(all) struct QueryResult {
    expression : String
    values : Array[Json]
    strings : Array[String]
    count : Int
    empty : Bool
    } derive(Eq, ToJson,
    Debug
    )

    ReferenceResolution

    pub(all) struct ReferenceResolution {
    reference : String
    target_type : String?
    target_id : String?
    resolved : Bool
    target : Json?
    } derive(Eq, ToJson,
    Debug
    )

    ReportDelta

    pub(all) struct ReportDelta {
    added : Int
    removed : Int
    unchanged : Int
    added_codes : Array[String]
    removed_codes : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    ResourceCategory

    pub(all) enum ResourceCategory {
    Clinical
    Administrative
    Workflow
    Infrastructure
    Exchange
    Unknown
    } derive(Eq, ToJson,
    Debug
    )

    ResourceConstraint

    pub(all) struct ResourceConstraint {
    path : String
    kind : ConstraintKind
    expected : String
    message : String
    } derive(Eq, ToJson,
    Debug
    )

    ResourceConstraint::date

    fn ResourceConstraint::date(path : String, message? : String) -> ResourceConstraint

    ResourceConstraint::non_empty

    fn ResourceConstraint::non_empty(path : String, message? : String) -> ResourceConstraint

    ResourceConstraint::reference

    fn ResourceConstraint::reference(path : String, message? : String) -> ResourceConstraint

    ResourceConstraint::required

    fn ResourceConstraint::required(path : String, message? : String) -> ResourceConstraint

    ResourceConstraint::type_is

    fn ResourceConstraint::type_is(path : String, expected : String, message? : String) -> ResourceConstraint

    ResourceDiff

    pub(all) struct ResourceDiff {
    added_fields : Array[String]
    removed_fields : Array[String]
    changed_fields : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    ResourceKind

    pub(all) enum ResourceKind {
    Patient
    Observation
    Medication
    MedicationRequest
    DiagnosticReport
    Encounter
    Condition
    Procedure
    Immunization
    AllergyIntolerance
    CarePlan
    Practitioner
    Organization
    Location
    ServiceRequest
    Goal
    CareTeam
    Device
    Specimen
    Questionnaire
    List
    Composition
    DocumentReference
    Provenance
    AuditEvent
    Bundle
    Other(String)
    } derive(Eq, ToJson,
    Debug
    )

    ResourceKind::to_string

    fn ResourceKind::to_string(self : ResourceKind) -> String

    ResourceMetadata

    pub(all) struct ResourceMetadata {
    resource_type : String
    category : ResourceCategory
    supported : Bool
    required_fields : Array[String]
    reference_fields : Array[String]
    date_fields : Array[String]
    description : String
    } derive(Eq, ToJson,
    Debug
    )

    ResourceMetrics

    pub(all) struct ResourceMetrics {
    resource_type : String
    id_present : Bool
    field_count : Int
    scalar_count : Int
    depth : Int
    payload_bytes : Int
    valid : Bool
    quality_score : Int
    } derive(Eq, ToJson,
    Debug
    )

    ResourcePatch

    pub(all) struct ResourcePatch {
    path : String
    value : Json?
    remove : Bool
    } derive(Eq, ToJson,
    Debug
    )

    ResourcePatch::remove

    fn ResourcePatch::remove(path : String) -> ResourcePatch

    ResourcePatch::set

    fn ResourcePatch::set(path : String, value : Json) -> ResourcePatch

    ResourceSchema

    pub(all) struct ResourceSchema {
    resource_type : String
    version : FhirVersion
    fields : Array[SchemaField]
    summary : String
    } derive(Eq, ToJson,
    Debug
    )

    SchemaField

    pub(all) struct SchemaField {
    path : String
    type_name : String
    required : Bool
    minimum_items : Int
    description : String
    } derive(Eq, ToJson,
    Debug
    )

    SearchHit

    pub(all) struct SearchHit {
    index : Int
    resource : Json
    score : Int
    matched_fields : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    Sensitivity

    pub(all) enum Sensitivity {
    Public
    Internal
    Sensitive
    Restricted
    } derive(Eq, ToJson,
    Debug
    )

    TerminologyCatalog

    pub(all) struct TerminologyCatalog {
    sets : Map[String, ValueSet]
    aliases : Map[String, String]
    } derive(Eq, ToJson,
    Debug
    )

    TerminologyCatalog::add

    fn TerminologyCatalog::add(self : TerminologyCatalog, value_set : ValueSet) -> Unit

    TerminologyCatalog::add_alias

    fn TerminologyCatalog::add_alias(self : TerminologyCatalog, alias_name : String, name : String) -> Unit

    TerminologyCatalog::contains

    fn TerminologyCatalog::contains(self : TerminologyCatalog, name : String, code : String) -> Bool

    TerminologyCatalog::get

    fn TerminologyCatalog::get(self : TerminologyCatalog, name : String) -> ValueSet?

    TerminologyCatalog::names

    fn TerminologyCatalog::names(self : TerminologyCatalog) -> Array[String]

    TerminologyCatalog::new

    TerminologyCatalog::size

    fn TerminologyCatalog::size(self : TerminologyCatalog) -> Int

    TerminologyCatalog::validate

    fn TerminologyCatalog::validate(self : TerminologyCatalog, name : String, path : String, system : String?, code : String) -> TerminologyIssue?

    TerminologyIssue

    pub(all) struct TerminologyIssue {
    path : String
    system : String?
    code : String
    message : String
    } derive(Eq, ToJson,
    Debug
    )

    ValidationMode

    pub(all) enum ValidationMode {
    Lenient
    Standard
    Strict
    } derive(Eq, ToJson,
    Debug
    )

    ValidationReport

    pub(all) struct ValidationReport {
    resource_type : String
    version : FhirVersion
    issues : Array[Issue]
    } derive(Eq, ToJson,
    Debug
    )

    ValueSet

    pub(all) struct ValueSet {
    name : String
    system : String?
    codes : Array[String]
    } derive(Eq, ToJson,
    Debug
    )

    ValueSet::contains

    fn ValueSet::contains(self : ValueSet, code : String) -> Bool

    ValueSet::new

    fn ValueSet::new(name : String, system : String?, codes : Array[String]) -> ValueSet

    ValueSet::size

    fn ValueSet::size(self : ValueSet) -> Int

    address_display

    fn address_display(value : Json, index : Int) -> String

    address_lines

    fn address_lines(value : Json) -> Array[String]

    all_references_resolve

    fn all_references_resolve(values : Array[Json]) -> Bool

    allergy_intolerance_summary

    fn allergy_intolerance_summary(value : Json) -> AllergyIntoleranceSummary

    analyze_bundle

    fn analyze_bundle(bundle : Json) -> BundleAnalytics

    apply_resource_patch

    fn apply_resource_patch(value : Json, patch : ResourcePatch) -> Json

    apply_resource_patches

    fn apply_resource_patches(value : Json, patches : Array[ResourcePatch]) -> Json

    audit_event_agents

    fn audit_event_agents(value : Json) -> Array[String]

    audit_event_entities

    fn audit_event_entities(value : Json) -> Array[String]

    audit_event_summary

    fn audit_event_summary(value : Json) -> CommonResourceSummary

    batch_is_acceptable

    fn batch_is_acceptable(values : Array[Json]) -> Bool

    batch_issue_histogram

    fn batch_issue_histogram(values : Array[Json]) -> Map[String, Int]

    batch_metrics

    fn batch_metrics(values : Array[Json]) -> Array[ResourceMetrics]

    batch_quality

    fn batch_quality(values : Array[Json]) -> BatchQuality

    batch_quality_findings

    fn batch_quality_findings(values : Array[Json]) -> Array[QualityFinding]

    batch_quality_score

    fn batch_quality_score(values : Array[Json]) -> Int

    batch_quality_score_average

    fn batch_quality_score_average(values : Array[Json]) -> Int

    batch_quality_text

    fn batch_quality_text(text : String) -> String

    batch_type_histogram

    fn batch_type_histogram(values : Array[Json]) -> Map[String, Int]

    benchmark_bundle

    fn benchmark_bundle(count : Int) -> Json

    benchmark_bundle_analysis

    fn benchmark_bundle_analysis(count : Int) -> BenchmarkObservation

    benchmark_case_bundle

    fn benchmark_case_bundle(count : Int) -> BenchmarkCase

    benchmark_case_matrix

    fn benchmark_case_matrix() -> Array[BenchmarkCase]

    benchmark_case_ndjson

    fn benchmark_case_ndjson(count : Int) -> BenchmarkCase

    fn benchmark_case_search(count : Int) -> BenchmarkCase

    benchmark_case_single

    fn benchmark_case_single() -> BenchmarkCase

    benchmark_case_summary

    fn benchmark_case_summary(case_ : BenchmarkCase) -> String

    benchmark_expected_bundle_count

    fn benchmark_expected_bundle_count(count : Int) -> Int

    benchmark_expected_ndjson_count

    fn benchmark_expected_ndjson_count(count : Int) -> Int

    benchmark_expected_search_count

    fn benchmark_expected_search_count(count : Int) -> Int

    benchmark_expected_validation_count

    fn benchmark_expected_validation_count(count : Int) -> Int

    benchmark_matrix_is_nonempty

    fn benchmark_matrix_is_nonempty() -> Bool

    benchmark_matrix_summary

    fn benchmark_matrix_summary() -> Array[String]

    benchmark_mixed_ndjson

    fn benchmark_mixed_ndjson(count : Int) -> String

    benchmark_ndjson

    fn benchmark_ndjson(count : Int) -> String

    benchmark_ndjson_validation

    fn benchmark_ndjson_validation(count : Int) -> BenchmarkObservation

    benchmark_observation

    fn benchmark_observation(index : Int) -> Json

    benchmark_observation_validation

    fn benchmark_observation_validation(count : Int) -> BenchmarkObservation

    benchmark_observations

    fn benchmark_observations(count : Int) -> Array[Json]

    benchmark_patient

    fn benchmark_patient(index : Int) -> Json

    benchmark_scenario_csv

    fn benchmark_scenario_csv() -> String

    benchmark_scenario_rows

    fn benchmark_scenario_rows() -> Array[String]

    benchmark_scenario_summary

    fn benchmark_scenario_summary() -> String

    benchmark_scenarios

    fn benchmark_scenarios() -> Array[BenchmarkObservation]

    benchmark_search_scan

    fn benchmark_search_scan(count : Int) -> BenchmarkObservation

    benchmark_text

    fn benchmark_text(count : Int) -> String

    bulk_all_chunks_valid

    fn bulk_all_chunks_valid(values : Array[Json], chunk_size : Int) -> Bool

    bulk_chunk_count

    fn bulk_chunk_count(values : Array[Json], chunk_size : Int) -> Int

    bulk_chunk_sizes

    fn bulk_chunk_sizes(values : Array[Json], chunk_size : Int) -> Array[Int]

    bulk_from_ndjson

    fn bulk_from_ndjson(text : String) -> Array[Json]

    bulk_merge_ndjson

    fn bulk_merge_ndjson(parts : Array[String]) -> String

    bulk_partition_by_type

    fn bulk_partition_by_type(values : Array[Json]) -> Map[String, Array[Json]]

    bulk_summary

    fn bulk_summary(values : Array[Json], chunk_size : Int) -> String

    bulk_to_json

    fn bulk_to_json(values : Array[Json]) -> String

    bulk_to_ndjson

    fn bulk_to_ndjson(values : Array[Json]) -> String

    bulk_unique_ids

    fn bulk_unique_ids(values : Array[Json]) -> Array[String]

    bulk_validate_chunks

    fn bulk_validate_chunks(values : Array[Json], chunk_size : Int) -> Array[BatchQuality]

    bundle_analytics_summary

    fn bundle_analytics_summary(bundle : Json) -> String

    bundle_csv_text

    fn bundle_csv_text(text : String) -> String?

    bundle_dangling_references

    fn bundle_dangling_references(bundle : Json) -> Array[String]

    bundle_duplicate_count

    fn bundle_duplicate_count(bundle : Json) -> Int

    bundle_empty

    fn bundle_empty(bundle : Json) -> Bool

    bundle_entries

    fn bundle_entries(bundle : Json) -> Array[BundleEntry]

    bundle_entry_count_by_type

    fn bundle_entry_count_by_type(bundle : Json) -> Map[String, Int]

    bundle_entry_csv

    fn bundle_entry_csv(bundle : Json) -> String

    bundle_entry_ndjson

    fn bundle_entry_ndjson(bundle : Json) -> String

    bundle_entry_references

    fn bundle_entry_references(bundle : Json) -> Array[String]

    bundle_filter_kind

    fn bundle_filter_kind(bundle : Json, kind : ResourceKind) -> Array[Json]

    bundle_filter_valid

    fn bundle_filter_valid(bundle : Json) -> Array[Json]

    bundle_graph

    fn bundle_graph(bundle : Json) -> BundleGraph

    bundle_graph_degree

    fn bundle_graph_degree(bundle : Json, key : String) -> (Int, Int)

    bundle_graph_edges

    fn bundle_graph_edges(bundle : Json) -> Array[GraphEdge]

    bundle_graph_is_acyclic

    fn bundle_graph_is_acyclic(bundle : Json) -> Bool

    bundle_graph_node_keys

    fn bundle_graph_node_keys(bundle : Json) -> Array[String]

    bundle_graph_summary

    fn bundle_graph_summary(bundle : Json) -> String

    bundle_graph_text

    fn bundle_graph_text(text : String) -> String?

    bundle_has_duplicate_ids

    fn bundle_has_duplicate_ids(bundle : Json) -> Bool

    bundle_has_resource_type

    fn bundle_has_resource_type(bundle : Json, kind : String) -> Bool

    bundle_incoming_references

    fn bundle_incoming_references(bundle : Json, key : String) -> Array[String]

    bundle_is_consistent

    fn bundle_is_consistent(bundle : Json) -> Bool

    bundle_issue_codes

    fn bundle_issue_codes(bundle : Json) -> Array[String]

    bundle_outgoing_references

    fn bundle_outgoing_references(bundle : Json, key : String) -> Array[String]

    bundle_page

    fn bundle_page(bundle : Json, offset : Int, limit : Int) -> Array[Json]

    bundle_payload_size

    fn bundle_payload_size(bundle : Json) -> Int

    bundle_quality_score

    fn bundle_quality_score(bundle : Json) -> Int

    bundle_rebuild

    fn bundle_rebuild(bundle : Json, resources : Array[Json]) -> Json

    bundle_reference_count

    fn bundle_reference_count(bundle : Json) -> Int

    bundle_reference_histogram

    fn bundle_reference_histogram(bundle : Json) -> Map[String, Int]

    bundle_resource_at

    fn bundle_resource_at(bundle : Json, index : Int) -> Json?

    bundle_resource_count

    fn bundle_resource_count(bundle : Json) -> Int

    bundle_resource_ids

    fn bundle_resource_ids(bundle : Json) -> Array[String]

    bundle_resource_type_list

    fn bundle_resource_type_list(bundle : Json) -> Array[String]

    bundle_resources

    fn bundle_resources(bundle : Json) -> Array[Json]

    bundle_status_summary

    fn bundle_status_summary(bundle : Json) -> String

    bundle_structure_is_valid

    fn bundle_structure_is_valid(bundle : Json) -> Bool

    bundle_type_count

    fn bundle_type_count(bundle : Json, kind : String) -> Int

    bundle_type_summary

    fn bundle_type_summary(bundle : Json) -> String

    bundle_validate_and_filter

    fn bundle_validate_and_filter(bundle : Json) -> (BundleValidation, Json)

    bundle_without_invalid

    fn bundle_without_invalid(bundle : Json) -> Json

    canonical_json

    fn canonical_json(value : Json, indent? : Int) -> String

    canonical_resource

    fn canonical_resource(value : Json) -> Json

    canonicalize_json_text

    fn canonicalize_json_text(text : String) -> String?

    care_plan_summary

    fn care_plan_summary(value : Json) -> CarePlanSummary

    care_team_summary

    fn care_team_summary(value : Json) -> CommonResourceSummary

    chunk_resources

    fn chunk_resources(values : Array[Json], chunk_size : Int) -> Array[BulkChunk]

    classify_field

    fn classify_field(policy : PrivacyPolicy, field : String) -> Sensitivity

    codeable_codes

    fn codeable_codes(value : Json) -> Array[String]

    codeable_codings

    fn codeable_codings(value : Json) -> Array[CodingRecord]

    codeable_displays

    fn codeable_displays(value : Json) -> Array[String]

    codeable_find_code

    fn codeable_find_code(value : Json, system : String) -> String?

    codeable_has_code

    fn codeable_has_code(value : Json, code : String) -> Bool

    codeable_has_system_code

    fn codeable_has_system_code(value : Json, system : String, code : String) -> Bool

    codeable_is_empty

    fn codeable_is_empty(value : Json) -> Bool

    codeable_merge

    fn codeable_merge(left : Json, right : Json) -> Json

    codeable_primary_display

    fn codeable_primary_display(value : Json) -> String?

    codeable_summary

    fn codeable_summary(value : Json) -> String

    codeable_systems

    fn codeable_systems(value : Json) -> Array[String]

    coding_record

    fn coding_record(value : Json) -> CodingRecord

    common_condition_status

    fn common_condition_status() -> ValueSet

    common_encounter_status

    fn common_encounter_status() -> ValueSet

    common_medication_status

    fn common_medication_status() -> ValueSet

    common_observation_constraints

    fn common_observation_constraints() -> ConstraintSet

    common_observation_status

    fn common_observation_status() -> ValueSet

    common_patient_constraints

    fn common_patient_constraints() -> ConstraintSet

    common_resource_summary

    fn common_resource_summary(value : Json) -> CommonResourceSummary

    compare_fhir_dates

    fn compare_fhir_dates(left : String, right : String) -> Int?

    compare_reports

    fn compare_reports(before : ValidationReport, after : ValidationReport) -> ReportDelta

    complete_quality_is_valid

    fn complete_quality_is_valid(value : Json, values : Array[Json]) -> Bool

    complete_quality_report

    fn complete_quality_report(value : Json, values : Array[Json]) -> ValidationReport

    composition_summary

    fn composition_summary(value : Json) -> CommonResourceSummary

    condition_summary

    fn condition_summary(value : Json) -> ConditionSummary

    constraint_count

    fn constraint_count(set : ConstraintSet) -> Int

    constraints_are_valid

    fn constraints_are_valid(value : Json, set : ConstraintSet) -> Bool

    constraints_summary

    fn constraints_summary(set : ConstraintSet) -> String

    contact_point_values

    fn contact_point_values(value : Json) -> Array[String]

    csv_escape

    fn csv_escape(text : String) -> String

    csv_row

    fn csv_row(values : Array[String]) -> String

    date_day

    fn date_day(value : String) -> Int?

    date_inputs_are_valid

    fn date_inputs_are_valid(values : Array[String]) -> Bool

    date_is_after

    fn date_is_after(left : String, right : String) -> Bool

    date_is_before

    fn date_is_before(left : String, right : String) -> Bool

    date_is_equal

    fn date_is_equal(left : String, right : String) -> Bool

    date_month

    fn date_month(value : String) -> Int?

    date_precision

    fn date_precision(value : String) -> DatePrecision

    date_precision_name

    fn date_precision_name(value : String) -> String

    date_range_label

    fn date_range_label(start : String, end : String) -> String

    date_year

    fn date_year(value : String) -> Int?

    default_terminology_catalog

    fn default_terminology_catalog() -> TerminologyCatalog

    delete_resource

    fn delete_resource(values : Array[Json], kind : String, id : String) -> Array[Json]

    device_summary

    fn device_summary(value : Json) -> CommonResourceSummary

    diagnostic_report_summary

    fn diagnostic_report_summary(value : Json) -> DiagnosticReportSummary

    distinct_path_strings

    fn distinct_path_strings(value : Json, path : String) -> Array[String]

    document_reference_summary

    fn document_reference_summary(value : Json) -> CommonResourceSummary

    encounter_summary

    fn encounter_summary(value : Json) -> EncounterSummary

    example_bundle_json

    fn example_bundle_json() -> String

    example_observation_json

    fn example_observation_json() -> String

    example_patient_json

    fn example_patient_json() -> String

    export_bundle

    fn export_bundle(bundle : Json, options : ExportOptions) -> String

    export_format_name

    fn export_format_name(format : ExportFormat) -> String

    export_is_reproducible

    fn export_is_reproducible(values : Array[Json], options : ExportOptions) -> Bool

    export_line_count

    fn export_line_count(value : String) -> Int

    export_options_redacted

    fn export_options_redacted(options : ExportOptions) -> ExportOptions

    export_resources

    fn export_resources(values : Array[Json], options : ExportOptions) -> String

    export_round_trip_ndjson

    fn export_round_trip_ndjson(value : String) -> NdjsonReport

    export_summary

    fn export_summary(values : Array[Json], options : ExportOptions) -> String

    filter_invalid_resources

    fn filter_invalid_resources(values : Array[Json]) -> Array[Json]

    filter_resources_by_kind

    fn filter_resources_by_kind(values : Array[Json], kind : ResourceKind) -> Array[Json]

    filter_valid_resources

    fn filter_valid_resources(values : Array[Json]) -> Array[Json]

    find_first_resource

    fn find_first_resource(values : Array[Json], kind : String, id : String) -> Json?

    find_or_create_resource

    fn find_or_create_resource(values : Array[Json], kind : String, id : String) -> (Array[Json], Json)

    format_optional

    fn format_optional(value : String?) -> String

    goal_summary

    fn goal_summary(value : Json) -> CommonResourceSummary

    graph_incoming_edges

    fn graph_incoming_edges(graph : BundleGraph, key : String) -> Array[GraphEdge]

    graph_outgoing_edges

    fn graph_outgoing_edges(graph : BundleGraph, key : String) -> Array[GraphEdge]

    group_observations_by_code

    fn group_observations_by_code(values : Array[Json]) -> Map[String, Array[Json]]

    group_resources_by_type

    fn group_resources_by_type(values : Array[Json]) -> Map[String, Array[Json]]

    has_identifier

    fn has_identifier(value : Json, system : String, identifier : String) -> Bool

    identifier_count

    fn identifier_count(value : Json) -> Int

    identifier_system

    fn identifier_system(value : Json, index : Int) -> String?

    identifier_type_text

    fn identifier_type_text(value : Json, index : Int) -> String?

    identifier_value

    fn identifier_value(value : Json, index : Int) -> String?

    immunization_summary

    fn immunization_summary(value : Json) -> ImmunizationSummary

    invalid_date_inputs

    fn invalid_date_inputs(values : Array[String]) -> Array[String]

    is_known_resource_type

    fn is_known_resource_type(kind : String) -> Bool

    is_supported_resource

    fn is_supported_resource(value : Json) -> Bool

    is_valid

    fn is_valid(value : Json, version? : FhirVersion) -> Bool

    is_valid_fhir_date

    fn is_valid_fhir_date(value : String) -> Bool

    is_valid_fhir_datetime

    fn is_valid_fhir_datetime(value : String) -> Bool

    issue_fingerprints

    fn issue_fingerprints(report : ValidationReport) -> Array[String]

    issue_list_text

    fn issue_list_text(issues : Array[Issue]) -> String

    issue_sort_key

    fn issue_sort_key(item : Issue) -> String

    join_resource_labels

    fn join_resource_labels(values : Array[Json], separator : String) -> String

    json_array_length

    fn json_array_length(value : Json) -> Int

    json_contains_text

    fn json_contains_text(value : Json, text : String) -> Bool

    json_depth

    fn json_depth(value : Json) -> Int

    json_depth_at_least

    fn json_depth_at_least(value : Json, minimum : Int) -> Bool

    json_equal_canonical

    fn json_equal_canonical(left : Json, right : Json) -> Bool

    json_flatten_scalars

    fn json_flatten_scalars(value : Json) -> Array[String]

    json_has_key

    fn json_has_key(value : Json, key : String) -> Bool

    json_key_count

    fn json_key_count(value : Json) -> Int

    json_leaf_paths

    fn json_leaf_paths(value : Json) -> Array[String]

    json_merge

    fn json_merge(left : Json, right : Json) -> Json

    json_object_keys

    fn json_object_keys(value : Json) -> Array[String]

    json_pointer

    fn json_pointer(value : Json, pointer : String) -> Json?

    json_scalar_count

    fn json_scalar_count(value : Json) -> Int

    json_size

    fn json_size(value : Json) -> Int

    json_without

    fn json_without(value : Json, fields : Array[String]) -> Json

    known_resource_types

    fn known_resource_types() -> Array[String]

    list_summary

    fn list_summary(value : Json) -> CommonResourceSummary

    mask_identifier

    fn mask_identifier(value : String, visible? : Int) -> String

    measurement_summary

    fn measurement_summary(values : Array[Json]) -> String

    measurement_values_in_range

    fn measurement_values_in_range(values : Array[Json], minimum : Double, maximum : Double) -> Array[Json]

    measurement_values_with_unit

    fn measurement_values_with_unit(values : Array[Json], unit : String) -> Array[Json]

    medication_request_summary

    fn medication_request_summary(value : Json) -> MedicationRequestSummary

    medication_summary

    fn medication_summary(value : Json) -> MedicationSummary

    merge_validation_reports

    fn merge_validation_reports(reports : Array[ValidationReport]) -> ValidationReport

    metadata_category_name

    fn metadata_category_name(category : ResourceCategory) -> String

    metadata_summary

    fn metadata_summary(kind : String) -> String

    metrics_average_depth

    fn metrics_average_depth(values : Array[Json]) -> Int

    metrics_csv

    fn metrics_csv(values : Array[Json]) -> String

    metrics_max_payload

    fn metrics_max_payload(values : Array[Json]) -> Int

    metrics_payload_bytes

    fn metrics_payload_bytes(values : Array[Json]) -> Int

    metrics_summary

    fn metrics_summary(values : Array[Json]) -> String

    metrics_text

    fn metrics_text(value : Json) -> String

    metrics_valid_percent

    fn metrics_valid_percent(values : Array[Json]) -> Int

    narrative_character_count

    fn narrative_character_count(value : String) -> Int

    narrative_contains

    fn narrative_contains(value : String, query : String) -> Bool

    narrative_coverage

    fn narrative_coverage(values : Array[Json]) -> Int

    narrative_plain_text

    fn narrative_plain_text(value : String) -> String

    narrative_preview

    fn narrative_preview(value : String, limit : Int) -> String

    narrative_text

    fn narrative_text(value : Json) -> String?

    narrative_word_count

    fn narrative_word_count(value : String) -> Int

    ndjson_errors

    fn ndjson_errors(text : String, version? : FhirVersion) -> Array[NdjsonLineError]

    ndjson_issue_count

    fn ndjson_issue_count(report : NdjsonReport, code : String) -> Int

    ndjson_partition

    fn ndjson_partition(report : NdjsonReport) -> (Array[Json], Array[NdjsonLineError])

    ndjson_resources

    fn ndjson_resources(text : String, version? : FhirVersion) -> Array[Json]

    ndjson_statistics

    fn ndjson_statistics(report : NdjsonReport) -> NdjsonStatistics

    ndjson_summary

    fn ndjson_summary(report : NdjsonReport) -> String

    ndjson_type_count

    fn ndjson_type_count(report : NdjsonReport, kind : String) -> Int

    normalise_quantity

    fn normalise_quantity(value : Json) -> Json

    normalize_narrative

    fn normalize_narrative(value : String) -> String

    number_at

    fn number_at(value : Json, path : String) -> Double?

    observation_code_count

    fn observation_code_count(values : Array[Json], code : String) -> Int

    observation_csv_row

    fn observation_csv_row(value : Json) -> String

    observation_csv_row_safe

    fn observation_csv_row_safe(value : Json) -> String

    observation_measurement

    fn observation_measurement(value : Json) -> Double?

    observation_measurement_range

    fn observation_measurement_range(values : Array[Json]) -> (Double, Double)?

    observation_measurement_stats

    fn observation_measurement_stats(values : Array[Json]) -> MeasurementStats

    observation_measurement_unit

    fn observation_measurement_unit(value : Json) -> String

    observation_point

    fn observation_point(value : Json) -> ObservationPoint

    observation_points

    fn observation_points(values : Array[Json]) -> Array[ObservationPoint]

    observation_points_csv

    fn observation_points_csv(values : Array[ObservationPoint]) -> String

    observation_series

    fn observation_series(values : Array[Json], code : String) -> Array[ObservationPoint]

    observation_series_max

    fn observation_series_max(values : Array[ObservationPoint]) -> Double?

    observation_series_mean

    fn observation_series_mean(values : Array[ObservationPoint]) -> Double?

    observation_series_median

    fn observation_series_median(values : Array[ObservationPoint]) -> Double?

    observation_series_min

    fn observation_series_min(values : Array[ObservationPoint]) -> Double?

    observation_series_summary

    fn observation_series_summary(values : Array[ObservationPoint]) -> String

    observation_series_unit

    fn observation_series_unit(values : Array[ObservationPoint]) -> String?

    observation_series_values

    fn observation_series_values(values : Array[ObservationPoint]) -> Array[Double]

    observation_summary

    fn observation_summary(value : Json) -> ObservationSummary

    observation_units

    fn observation_units(values : Array[Json]) -> Map[String, Int]

    observation_values

    fn observation_values(values : Array[Json]) -> Array[Double]

    operation_exit_status

    fn operation_exit_status(outcome : OperationOutcome) -> Int

    operation_normalize

    fn operation_normalize(value : Json) -> OperationResult

    operation_outcome

    fn operation_outcome(report : ValidationReport) -> OperationOutcome

    operation_outcome_codes

    fn operation_outcome_codes(outcome : OperationOutcome) -> Array[String]

    operation_outcome_error_count

    fn operation_outcome_error_count(outcome : OperationOutcome) -> Int

    operation_outcome_from_text

    fn operation_outcome_from_text(text : String) -> OperationOutcome

    operation_outcome_has_code

    fn operation_outcome_has_code(outcome : OperationOutcome, code : String) -> Bool

    operation_outcome_is_success

    fn operation_outcome_is_success(outcome : OperationOutcome) -> Bool

    operation_outcome_json

    fn operation_outcome_json(outcome : OperationOutcome) -> Json

    operation_outcome_locations

    fn operation_outcome_locations(outcome : OperationOutcome) -> Array[String]

    operation_outcome_text

    fn operation_outcome_text(outcome : OperationOutcome) -> String

    operation_outcome_warning_count

    fn operation_outcome_warning_count(outcome : OperationOutcome) -> Int

    operation_redact

    fn operation_redact(value : Json, policy : PrivacyPolicy) -> OperationResult

    operation_validate

    fn operation_validate(value : Json, profile? : Profile) -> OperationResult

    parse_json

    fn parse_json(text : String) -> Json?

    path_contains

    fn path_contains(value : Json, path : String, expected : String) -> Bool

    path_count_at_least

    fn path_count_at_least(value : Json, path : String, minimum : Int) -> Bool

    path_equals

    fn path_equals(value : Json, path : String, expected : String) -> Bool

    path_exists_all

    fn path_exists_all(value : Json, paths : Array[String]) -> Bool

    path_exists_any

    fn path_exists_any(value : Json, paths : Array[String]) -> Bool

    path_is_empty

    fn path_is_empty(value : Json, path : String) -> Bool

    path_is_singleton

    fn path_is_singleton(value : Json, path : String) -> Bool

    path_numeric_max

    fn path_numeric_max(value : Json, path : String) -> Double?

    path_numeric_min

    fn path_numeric_min(value : Json, path : String) -> Double?

    path_numeric_sum

    fn path_numeric_sum(value : Json, path : String) -> Double

    path_numeric_values

    fn path_numeric_values(value : Json, path : String) -> Array[Double]

    path_reference_targets

    fn path_reference_targets(value : Json, path : String) -> Array[String]

    path_resource_types

    fn path_resource_types(value : Json, path : String) -> Array[String]

    path_select_arrays

    fn path_select_arrays(value : Json, path : String) -> Array[Json]

    path_select_objects

    fn path_select_objects(value : Json, path : String) -> Array[Json]

    path_string_join

    fn path_string_join(value : Json, path : String, separator : String) -> String

    path_summary

    fn path_summary(value : Json, path : String) -> String

    patient_summary

    fn patient_summary(value : Json) -> PatientSummary

    period_contains

    fn period_contains(start : String, end : String, point : String) -> Bool

    period_is_valid

    fn period_is_valid(start : String, end : String) -> Bool

    period_overlap

    fn period_overlap(left_start : String, left_end : String, right_start : String, right_end : String) -> Bool

    policy_allows

    fn policy_allows(policy : PrivacyPolicy, field : String) -> Bool

    pretty_json

    fn pretty_json(value : Json) -> String

    privacy_audit

    fn privacy_audit(value : Json, policy : PrivacyPolicy) -> PrivacyAudit

    privacy_summary

    fn privacy_summary(value : Json, policy : PrivacyPolicy) -> String

    procedure_summary

    fn procedure_summary(value : Json) -> ProcedureSummary

    process_ndjson

    fn process_ndjson(text : String, options : ProcessingOptions) -> ProcessingResult

    process_resources

    fn process_resources(values : Array[Json], options : ProcessingOptions) -> ProcessingResult

    processing_error_count

    fn processing_error_count(result : ProcessingResult) -> Int

    processing_export

    fn processing_export(result : ProcessingResult, options : ExportOptions) -> String

    processing_is_successful

    fn processing_is_successful(result : ProcessingResult) -> Bool

    processing_redacted_export

    fn processing_redacted_export(result : ProcessingResult, options : ExportOptions) -> String

    processing_summary

    fn processing_summary(result : ProcessingResult) -> String

    processing_warning_count

    fn processing_warning_count(result : ProcessingResult) -> Int

    profile_is_valid

    fn profile_is_valid(value : Json, profile : Profile) -> Bool

    profile_issue_count

    fn profile_issue_count(value : Json, profile : Profile) -> Int

    profile_rule_allowed

    fn profile_rule_allowed(path : String, values : Array[String]) -> ProfileRule

    profile_rule_min_items

    fn profile_rule_min_items(path : String, count : Int) -> ProfileRule

    profile_rule_required

    fn profile_rule_required(path : String) -> ProfileRule

    profile_rule_type

    fn profile_rule_type(path : String, type_name : String) -> ProfileRule

    provenance_actor_count

    fn provenance_actor_count(value : Json) -> Int

    provenance_actors

    fn provenance_actors(value : Json) -> Array[ProvenanceActor]

    provenance_has_actor

    fn provenance_has_actor(value : Json, reference : String) -> Bool

    provenance_is_complete

    fn provenance_is_complete(value : Json) -> Bool

    provenance_summary

    fn provenance_summary(value : Json) -> CommonResourceSummary

    provenance_summary_text

    fn provenance_summary_text(value : Json) -> String

    provenance_target_count

    fn provenance_target_count(value : Json) -> Int

    provenance_targets

    fn provenance_targets(value : Json) -> Array[String]

    pseudonymize_identifier

    fn pseudonymize_identifier(value : String, scope? : String) -> String

    pseudonymize_resource_id

    fn pseudonymize_resource_id(value : Json) -> Json

    quality_dashboard_rows

    fn quality_dashboard_rows(values : Array[Json]) -> Array[String]

    quality_finding_count

    fn quality_finding_count(value : Json) -> Int

    quality_findings

    fn quality_findings(value : Json) -> Array[QualityFinding]

    quality_score

    fn quality_score(value : Json) -> Int

    quality_status

    fn quality_status(value : Json) -> String

    quantity_is_reasonable

    fn quantity_is_reasonable(value : Json, path : String, minimum : Double, maximum : Double) -> Bool

    quantity_system

    fn quantity_system(value : Json, path : String) -> String?

    quantity_unit

    fn quantity_unit(value : Json, path : String) -> String?

    query_all_strings

    fn query_all_strings(value : Json, expressions : Array[String]) -> Map[String, Array[String]]

    query_count

    fn query_count(value : Json, expression : String) -> Int

    query_exists

    fn query_exists(value : Json, expression : String) -> Bool

    query_first

    fn query_first(value : Json, expression : String) -> Json?

    query_json_text

    fn query_json_text(text : String, expression : String) -> QueryResult?

    query_many

    fn query_many(value : Json, expressions : Array[String]) -> Array[QueryResult]

    query_many_csv

    fn query_many_csv(value : Json, expressions : Array[String]) -> String

    query_many_table

    fn query_many_table(value : Json, expressions : Array[String]) -> Array[String]

    query_paths

    fn query_paths(value : Json, expression : String) -> Array[(String, Json)]

    query_resource_references

    fn query_resource_references(value : Json) -> Array[String]

    query_resource_summary

    fn query_resource_summary(value : Json, expressions : Array[String]) -> String

    query_result

    fn query_result(value : Json, expression : String) -> QueryResult

    query_result_csv

    fn query_result_csv(result : QueryResult) -> String

    query_result_first_text

    fn query_result_first_text(result : QueryResult) -> String

    query_result_has_value

    fn query_result_has_value(result : QueryResult, expected : String) -> Bool

    query_result_is_scalar

    fn query_result_is_scalar(result : QueryResult) -> Bool

    query_result_json

    fn query_result_json(result : QueryResult) -> Json

    query_result_summary

    fn query_result_summary(result : QueryResult) -> String

    query_result_text

    fn query_result_text(result : QueryResult) -> String

    query_strings

    fn query_strings(value : Json, expression : String) -> Array[String]

    query_text

    fn query_text(value : Json, expression : String, fallback? : String) -> String

    query_values

    fn query_values(value : Json, expression : String) -> Array[Json]

    questionnaire_summary

    fn questionnaire_summary(value : Json) -> CommonResourceSummary

    redact_by_policy

    fn redact_by_policy(value : Json, policy : PrivacyPolicy) -> Json

    redact_fields

    fn redact_fields(value : Json, fields : Array[String]) -> Json

    redact_json_text

    fn redact_json_text(text : String, policy : PrivacyPolicy) -> String?

    redact_standard_sensitive_fields

    fn redact_standard_sensitive_fields(value : Json) -> Json

    reference_graph_edges

    fn reference_graph_edges(values : Array[Json]) -> Array[GraphEdge]

    reference_is_well_formed

    fn reference_is_well_formed(reference : String) -> Bool

    reference_resolution_summary

    fn reference_resolution_summary(values : Array[Json]) -> String

    reference_resource_id

    fn reference_resource_id(reference : String) -> String?

    reference_resource_type

    fn reference_resource_type(reference : String) -> String?

    reference_summary_text

    fn reference_summary_text(value : Json) -> String

    reference_target_counts

    fn reference_target_counts(values : Array[Json]) -> Map[String, Int]

    report_error_count

    fn report_error_count(report : ValidationReport) -> Int

    report_info_count

    fn report_info_count(report : ValidationReport) -> Int

    report_is_clean

    fn report_is_clean(report : ValidationReport) -> Bool

    report_is_warning_only

    fn report_is_warning_only(report : ValidationReport) -> Bool

    report_issue_text

    fn report_issue_text(report : ValidationReport) -> String

    report_json

    fn report_json(report : ValidationReport) -> Json

    report_text

    fn report_text(report : ValidationReport) -> String

    report_warning_count

    fn report_warning_count(report : ValidationReport) -> Int

    resolve_reference

    fn resolve_reference(reference : String, values : Array[Json]) -> ReferenceResolution

    resolve_references

    fn resolve_references(value : Json, values : Array[Json]) -> Array[ReferenceResolution]

    resolved_references

    fn resolved_references(value : Json, values : Array[Json]) -> Array[Json]

    resource_activity_references

    fn resource_activity_references(value : Json) -> Array[String]

    resource_category

    fn resource_category(kind : String) -> ResourceCategory

    resource_code_system

    fn resource_code_system(value : Json, path : String, system : String) -> Bool

    resource_code_text

    fn resource_code_text(value : Json) -> String?

    resource_codes

    fn resource_codes(value : Json, path : String) -> Array[String]

    resource_codings

    fn resource_codings(value : Json, path : String) -> Array[CodingRecord]

    resource_contains_sensitive_data

    fn resource_contains_sensitive_data(value : Json, policy : PrivacyPolicy) -> Bool

    resource_csv_header

    fn resource_csv_header() -> String

    resource_csv_text

    fn resource_csv_text(text : String) -> String?

    resource_date

    fn resource_date(value : Json) -> String?

    resource_date_fields

    fn resource_date_fields(kind : String) -> Array[String]

    resource_diff

    fn resource_diff(before : Json, after : Json) -> ResourceDiff

    resource_diff_count

    fn resource_diff_count(before : Json, after : Json) -> Int

    resource_display_name

    fn resource_display_name(value : Json) -> String

    resource_field_names

    fn resource_field_names(value : Json) -> Array[String]

    resource_has_code

    fn resource_has_code(value : Json, path : String, code : String) -> Bool

    resource_has_field

    fn resource_has_field(value : Json, field : String) -> Bool

    resource_has_id

    fn resource_has_id(value : Json) -> Bool

    resource_has_narrative

    fn resource_has_narrative(value : Json) -> Bool

    resource_id_or

    fn resource_id_or(value : Json, fallback : String) -> String

    resource_identifiers

    fn resource_identifiers(value : Json) -> Array[(String, String)]

    resource_index

    fn resource_index(values : Array[Json]) -> Map[String, Json]

    resource_issue_codes

    fn resource_issue_codes(value : Json) -> Array[String]

    resource_key

    fn resource_key(value : Json) -> String

    resource_kind

    fn resource_kind(value : Json) -> ResourceKind

    resource_kind_category_text

    fn resource_kind_category_text(value : Json) -> String

    resource_kind_is_clinical

    fn resource_kind_is_clinical(value : Json) -> Bool

    resource_kind_is_exchange

    fn resource_kind_is_exchange(value : Json) -> Bool

    resource_kind_is_workflow

    fn resource_kind_is_workflow(value : Json) -> Bool

    resource_kind_names

    fn resource_kind_names(values : Array[Json]) -> Array[String]

    resource_kind_text

    fn resource_kind_text(text : String) -> String

    resource_label

    fn resource_label(value : Json) -> String

    resource_labels

    fn resource_labels(values : Array[Json]) -> Array[String]

    resource_match_count

    fn resource_match_count(value : Json, expressions : Array[String]) -> Int

    resource_matches_all

    fn resource_matches_all(value : Json, expressions : Array[String]) -> Bool

    resource_metadata

    fn resource_metadata(kind : String) -> ResourceMetadata

    resource_metrics

    fn resource_metrics(value : Json) -> ResourceMetrics

    resource_narrative

    fn resource_narrative(value : Json) -> String?

    resource_projection

    fn resource_projection(value : Json, fields : Array[String]) -> Json

    resource_quality_is_valid

    fn resource_quality_is_valid(value : Json) -> Bool

    resource_quality_issues

    fn resource_quality_issues(value : Json) -> Array[Issue]

    resource_quality_report

    fn resource_quality_report(value : Json) -> ValidationReport

    resource_quality_text

    fn resource_quality_text(text : String) -> String

    resource_reference_fields

    fn resource_reference_fields(kind : String) -> Array[String]

    resource_remove_field

    fn resource_remove_field(value : Json, field : String) -> Json

    resource_required_fields

    fn resource_required_fields(kind : String) -> Array[String]

    resource_set_field

    fn resource_set_field(value : Json, field : String, replacement : Json) -> Json

    resource_status

    fn resource_status(value : Json) -> String?

    resource_status_or

    fn resource_status_or(value : Json, fallback : String) -> String

    resource_subject

    fn resource_subject(value : Json) -> String?

    resource_summary_line

    fn resource_summary_line(value : Json) -> String

    resource_table_row

    fn resource_table_row(value : Json) -> String

    resource_table_rows

    fn resource_table_rows(values : Array[Json]) -> Array[String]

    resource_type

    fn resource_type(value : Json) -> String?

    resource_type_count

    fn resource_type_count(values : Array[Json], kind : String) -> Int

    resource_type_or

    fn resource_type_or(value : Json, fallback : String) -> String

    resource_version_warning

    fn resource_version_warning(value : Json, version : FhirVersion) -> Issue?

    resources_referencing

    fn resources_referencing(values : Array[Json], reference : String) -> Array[Json]

    resources_with_narrative

    fn resources_with_narrative(values : Array[Json]) -> Array[Json]

    run_benchmark_bundle

    fn run_benchmark_bundle(count : Int) -> Int

    run_benchmark_ndjson

    fn run_benchmark_ndjson(count : Int) -> Int

    fn run_benchmark_search(count : Int) -> Int

    run_benchmark_validation

    fn run_benchmark_validation(count : Int) -> Int

    safe_parse

    fn safe_parse(text : String) -> Json?

    safe_parse_many

    fn safe_parse_many(texts : Array[String]) -> Array[Json]

    schema_field_count

    fn schema_field_count(schema : ResourceSchema) -> Int

    schema_field_names

    fn schema_field_names(schema : ResourceSchema) -> Array[String]

    schema_for

    fn schema_for(kind : String, version? : FhirVersion) -> ResourceSchema

    schema_for_resource

    fn schema_for_resource(value : Json) -> ResourceSchema

    schema_is_valid

    fn schema_is_valid(value : Json, schema : ResourceSchema) -> Bool

    schema_registry

    fn schema_registry() -> Map[String, ResourceSchema]

    schema_summary

    fn schema_summary(schema : ResourceSchema) -> String

    schema_text

    fn schema_text(kind : String) -> String

    schema_validate

    fn schema_validate(value : Json, schema : ResourceSchema) -> Array[Issue]

    schema_validate_resource

    fn schema_validate_resource(value : Json) -> Array[Issue]

    search_by_field

    fn search_by_field(values : Array[Json], path : String, query : String) -> Array[Json]

    search_by_id

    fn search_by_id(values : Array[Json], id : String) -> Array[Json]

    search_by_reference

    fn search_by_reference(values : Array[Json], reference : String) -> Array[Json]

    search_by_status

    fn search_by_status(values : Array[Json], status : String) -> Array[Json]

    search_by_type

    fn search_by_type(values : Array[Json], kind : String) -> Array[Json]

    search_by_type_and_status

    fn search_by_type_and_status(values : Array[Json], kind : String, status : String) -> Array[Json]

    search_hits

    fn search_hits(values : Array[Json], query : String) -> Array[SearchHit]

    search_resource

    fn search_resource(value : Json, query : String) -> Bool

    search_resources

    fn search_resources(values : Array[Json], query : String) -> Array[Json]

    search_summary

    fn search_summary(values : Array[Json], query : String) -> String

    select_resources

    fn select_resources(values : Array[Json], expressions : Array[String]) -> Array[Json]

    sensitive_fields_in_resource

    fn sensitive_fields_in_resource(value : Json, policy : PrivacyPolicy) -> Array[String]

    service_request_summary

    fn service_request_summary(value : Json) -> CommonResourceSummary

    service_validate_json

    fn service_validate_json(service : FhirService, text : String) -> OperationResult

    service_validate_text

    fn service_validate_text(service : FhirService, text : String) -> String

    severity_rank

    fn severity_rank(severity : String) -> Int

    sort_issues

    fn sort_issues(issues : Array[Issue]) -> Array[Issue]

    sort_resources_by_id

    fn sort_resources_by_id(values : Array[Json]) -> Array[Json]

    sort_resources_by_type

    fn sort_resources_by_type(values : Array[Json]) -> Array[Json]

    sorted_report

    fn sorted_report(report : ValidationReport) -> ValidationReport

    specimen_summary

    fn specimen_summary(value : Json) -> CommonResourceSummary

    strip_html_tags

    fn strip_html_tags(value : String) -> String

    summaries_for_resources

    fn summaries_for_resources(values : Array[Json]) -> Array[CommonResourceSummary]

    summarize_json_text

    fn summarize_json_text(text : String) -> String

    summary_csv

    fn summary_csv(values : Array[Json]) -> String

    summary_csv_header

    fn summary_csv_header() -> String

    summary_display_lines

    fn summary_display_lines(values : Array[Json]) -> Array[String]

    supported_kind_name

    fn supported_kind_name(value : Json) -> String

    supported_resource_text

    fn supported_resource_text() -> String

    terminology_all_codes_valid

    fn terminology_all_codes_valid(value_set : ValueSet, codes : Array[String]) -> Bool

    terminology_catalog_summary

    fn terminology_catalog_summary(catalog : TerminologyCatalog) -> String

    terminology_codes

    fn terminology_codes(value_set : ValueSet) -> Array[String]

    terminology_contains

    fn terminology_contains(value_set : ValueSet, code : String) -> Bool

    terminology_issue_summary

    fn terminology_issue_summary(issues : Array[TerminologyIssue]) -> String

    terminology_missing_codes

    fn terminology_missing_codes(value_set : ValueSet, codes : Array[String]) -> Array[String]

    terminology_status_is_valid

    fn terminology_status_is_valid(kind : String, status : String) -> Bool

    terminology_text

    fn terminology_text(kind : String, status : String) -> String

    unique_resource_ids

    fn unique_resource_ids(values : Array[Json]) -> Array[String]

    unresolved_references

    fn unresolved_references(value : Json, values : Array[Json]) -> Array[String]

    update_resource_id

    fn update_resource_id(value : Json, id : String) -> Json

    update_resource_status

    fn update_resource_status(value : Json, status : String) -> Json

    upsert_resource

    fn upsert_resource(values : Array[Json], value : Json) -> Array[Json]

    valid_json_count

    fn valid_json_count(texts : Array[String]) -> Int

    validate_batch

    fn validate_batch(values : Array[Json]) -> Array[ValidationReport]

    validate_bundle_structure

    fn validate_bundle_structure(bundle : Json) -> BundleValidation

    validate_code

    fn validate_code(path : String, system : String?, code : String, value_set : ValueSet) -> TerminologyIssue?

    validate_codeable_concept

    fn validate_codeable_concept(value : Json, path : String, value_set : ValueSet) -> Array[TerminologyIssue]

    validate_coding_array

    fn validate_coding_array(value : Json, path : String) -> Array[Issue]

    validate_constraints

    fn validate_constraints(value : Json, set : ConstraintSet) -> Array[Issue]

    validate_date_field

    fn validate_date_field(value : Json, path : String, datetime? : Bool) -> Array[Issue]

    validate_date_fields

    fn validate_date_fields(value : Json, paths : Array[String]) -> Array[Issue]

    validate_identifier_array

    fn validate_identifier_array(value : Json, path? : String) -> Array[Issue]

    validate_json_text

    fn validate_json_text(text : String) -> ValidationReport?

    validate_json_text_strict

    fn validate_json_text_strict(text : String) -> OperationOutcome

    validate_ndjson

    fn validate_ndjson(text : String, version? : FhirVersion) -> NdjsonReport

    validate_ndjson_lines

    fn validate_ndjson_lines(lines : Array[String], version? : FhirVersion) -> NdjsonReport

    validate_period

    fn validate_period(value : Json, path : String) -> Array[Issue]

    validate_profile_only

    fn validate_profile_only(value : Json, profile : Profile) -> ValidationReport

    validate_reference

    fn validate_reference(value : Json, path : String) -> Array[Issue]

    validate_reference_fields

    fn validate_reference_fields(value : Json, paths : Array[String]) -> Array[Issue]

    validate_reference_targets

    fn validate_reference_targets(value : Json, values : Array[Json]) -> Array[Issue]

    validate_resource

    fn validate_resource(value : Json, version? : FhirVersion) -> ValidationReport

    validate_temporal_consistency

    fn validate_temporal_consistency(value : Json) -> Array[Issue]

    validate_with_profile

    fn validate_with_profile(value : Json, profile : Profile, version? : FhirVersion) -> ValidationReport

    validation_mode_name

    fn validation_mode_name(mode : ValidationMode) -> String

    validation_mode_options

    fn validation_mode_options(mode : ValidationMode) -> ProcessingOptions

    validation_mode_rejects_warnings

    fn validation_mode_rejects_warnings(mode : ValidationMode) -> Bool

    validation_mode_summary

    fn validation_mode_summary(mode : ValidationMode, version : FhirVersion) -> String

    version_name

    fn version_name(version : FhirVersion) -> String

    version_supports

    fn version_supports(version : FhirVersion, kind : String) -> Bool

    versioned_validate

    fn versioned_validate(value : Json, version : FhirVersion) -> ValidationReport