From 87bc853981f2adf3c50617dbc063a866d2e1bf85 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Tue, 20 Feb 2024 14:13:06 +0000 Subject: [PATCH] build based on 20d9c82 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 6 +++--- dev/examples/index.html | 2 +- dev/generate/index.html | 2 +- dev/index.html | 2 +- dev/installation/index.html | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 2de6514..5803669 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-20T13:50:50","documenter_version":"1.2.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.1","generation_timestamp":"2024-02-20T14:13:02","documenter_version":"1.2.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 1a3204d..33bd204 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,8 +1,8 @@ -API · FHIRClient.jl

API

Index

Docs

FHIRClient.BaseURLType

The base URL for a FHIR server.

The base URL is also called the "Service Root URL"

Summary

struct BaseURL <: Any

Fields

  • uri :: URIs.URI
source
FHIRClient.ClientType

A FHIR client.

Summary

struct Client{V <: FHIRVersion, A <: Authentication} <: Any

Fields

  • fhir_version :: V
  • base_url :: BaseURL
  • auth :: A
source
FHIRClient.FHIRVersionType

Subtypes of FHIRVersion are singleton structs that correspond to versions of the FHIR specification.

Summary

abstract type FHIRVersion <: Any

source
FHIRClient.requestMethod
request(
+API · FHIRClient.jl

API

Index

Docs

FHIRClient.BaseURLType

The base URL for a FHIR server.

The base URL is also called the "Service Root URL"

Summary

struct BaseURL <: Any

Fields

  • uri :: URIs.URI
source
FHIRClient.ClientType

A FHIR client.

Summary

struct Client{V <: FHIRVersion, A <: Authentication} <: Any

Fields

  • fhir_version :: V
  • base_url :: BaseURL
  • auth :: A
source
FHIRClient.FHIRVersionType

Subtypes of FHIRVersion are singleton structs that correspond to versions of the FHIR specification.

Summary

abstract type FHIRVersion <: Any

source
FHIRClient.requestMethod
request(
     T, client::Client, verb::AbstractString, path::AbstractString;
     <keyword arguments>
-)

Perform a request with target path and method verb (such as "GET" or "POST") for the FHIR client, and parse the JSON response with JSON3 as an object of type T.

Arguments

  • body = nothing: JSON body of the request.

  • headers::AbstractDict = Dict{String, String}(): headers of the request.

  • query::Union{AbstractDict, Nothing} = nothing: query parameters.

  • require_base_url::Symbol = :strict: to what extent the requested URL has to match the base URL of the client. Possible values are:

    • :strict (requested URL has to start with the base URL),
    • :host (host and scheme of the requested URL and base URL have to be equal),
    • :scheme (scheme of the requested URL and base URL have to be equal),
    • :no (requested URL does not have to match the base URL).
  • verbose::Int = 0: Verbosity of the logging of the request and response processes. The keyword argument is forwarded to HTTP.request and can be set to 1 or 2 for increasingly verbose logging.

  • kwargs...: remaining keyword arguments that are forwarded to JSON3.read for parsing the JSON response.

See also request_json.

source
FHIRClient.request_jsonMethod
request_json(
+)

Perform a request with target path and method verb (such as "GET" or "POST") for the FHIR client, and parse the JSON response with JSON3 as an object of type T.

Arguments

  • body = nothing: JSON body of the request.

  • headers::AbstractDict = Dict{String, String}(): headers of the request.

  • query::Union{AbstractDict, Nothing} = nothing: query parameters.

  • require_base_url::Symbol = :strict: to what extent the requested URL has to match the base URL of the client. Possible values are:

    • :strict (requested URL has to start with the base URL),
    • :host (host and scheme of the requested URL and base URL have to be equal),
    • :scheme (scheme of the requested URL and base URL have to be equal),
    • :no (requested URL does not have to match the base URL).
  • verbose::Int = 0: Verbosity of the logging of the request and response processes. The keyword argument is forwarded to HTTP.request and can be set to 1 or 2 for increasingly verbose logging.

  • kwargs...: remaining keyword arguments that are forwarded to JSON3.read for parsing the JSON response.

See also request_json.

source
FHIRClient.request_jsonMethod
request_json(
     client::Client, verb::AbstractString, path::AbstractString;
     <keyword arguments>
-)

Perform a request with target path and method verb (such as "GET" or "POST") for the FHIR client, and parse the JSON response with JSON3.

Arguments

  • body::Union{JSON3.Object, Nothing} = nothing: JSON body of the request.
  • headers::AbstractDict = Dict{String, String}(): headers of the request.
  • query::Union{AbstractDict, Nothing} = nothing: query parameters.
  • require_base_url::Symbol = :strict: to what extent the requested URL has to match the base URL of the client. Possible values are:
    • :strict (requested URL has to start with the base URL),
    • :host (host and scheme of the requested URL and base URL have to be equal),
    • :scheme (scheme of the requested URL and base URL have to be equal),
    • :no (requested URL does not have to match the base URL).
  • verbose::Int = 0: Verbosity of the logging of the request and response processes. The keyword argument is forwarded to HTTP.request and can be set to 1 or 2 for increasingly verbose logging.

See also request.

source
+)

Perform a request with target path and method verb (such as "GET" or "POST") for the FHIR client, and parse the JSON response with JSON3.

Arguments

  • body::Union{JSON3.Object, Nothing} = nothing: JSON body of the request.
  • headers::AbstractDict = Dict{String, String}(): headers of the request.
  • query::Union{AbstractDict, Nothing} = nothing: query parameters.
  • require_base_url::Symbol = :strict: to what extent the requested URL has to match the base URL of the client. Possible values are:
    • :strict (requested URL has to start with the base URL),
    • :host (host and scheme of the requested URL and base URL have to be equal),
    • :scheme (scheme of the requested URL and base URL have to be equal),
    • :no (requested URL does not have to match the base URL).
  • verbose::Int = 0: Verbosity of the logging of the request and response processes. The keyword argument is forwarded to HTTP.request and can be set to 1 or 2 for increasingly verbose logging.

See also request.

source
diff --git a/dev/examples/index.html b/dev/examples/index.html index 29bd923..4f7484a 100644 --- a/dev/examples/index.html +++ b/dev/examples/index.html @@ -1,3 +1,3 @@ Examples · FHIRClient.jl

Examples

Basic example

julia> using FHIRClient
julia> using FHIRClient.R4Types
julia> fhir_version = FHIRClient.R4()FHIRClient.R4()
julia> base_url = FHIRClient.BaseURL("https://hapi.fhir.org/baseR4")FHIRClient.BaseURL(URI("https://hapi.fhir.org/baseR4"))
julia> auth = FHIRClient.AnonymousAuth()FHIRClient.AnonymousAuth()
julia> client = FHIRClient.Client(fhir_version, base_url, auth)FHIRClient.Client{FHIRClient.R4, FHIRClient.AnonymousAuth}(FHIRClient.R4(), FHIRClient.BaseURL(URI("https://hapi.fhir.org/baseR4")), FHIRClient.AnonymousAuth())
julia> request_path = "/Patient/1476056""/Patient/1476056"
julia> p = FHIRClient.request(Patient, client, "GET", request_path)FHIRClient.R4Types.Patient(nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, true, FHIRClient.R4Types.AbstractAddress[FHIRClient.R4Types.Address(nothing, nothing, nothing, FHIRClient.R4Types.AbstractElement[], nothing, nothing, nothing, nothing, nothing, "Verona", "US", nothing, FHIRClient.R4Types.AbstractExtension[], nothing, ["1979 Milky Way Dr."], nothing, "53593", "WI", nothing, nothing, "home"), FHIRClient.R4Types.Address(nothing, nothing, nothing, FHIRClient.R4Types.AbstractElement[], nothing, nothing, nothing, nothing, nothing, "MADISON", "US", nothing, FHIRClient.R4Types.AbstractExtension[], nothing, ["5301 Tokay Blvd"], FHIRClient.R4Types.Period(nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, FHIRClient.R4Types.FHIRDateTime("\"2011-08-04T00:00:00Z\"")), "53711", "WI", nothing, nothing, "temp")], Dates.Date("1985-08-01"), FHIRClient.R4Types.AbstractPatient_Communication[FHIRClient.R4Types.Patient_Communication(nothing, FHIRClient.R4Types.AbstractExtension[], nothing, FHIRClient.R4Types.CodeableConcept(nothing, FHIRClient.R4Types.AbstractCoding[FHIRClient.R4Types.Coding(nothing, nothing, nothing, nothing, nothing, "en", "English", FHIRClient.R4Types.AbstractExtension[], nothing, "urn:oid:2.16.840.1.113883.6.99", nothing, nothing)], FHIRClient.R4Types.AbstractExtension[], nothing, "English"), FHIRClient.R4Types.AbstractExtension[], true)], FHIRClient.R4Types.AbstractPatient_Contact[], FHIRClient.R4Types.ResourceList[], false, nothing, FHIRClient.R4Types.AbstractExtension[FHIRClient.R4Types.Extension(nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, "http://hl7.org/fhir/StructureDefinition/us-core-race", nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, FHIRClient.R4Types.CodeableConcept(nothing, FHIRClient.R4Types.AbstractCoding[FHIRClient.R4Types.Coding(nothing, nothing, nothing, nothing, nothing, "2028-9", "Asian", FHIRClient.R4Types.AbstractExtension[], nothing, "2.16.840.1.113883.5.104", nothing, nothing)], FHIRClient.R4Types.AbstractExtension[], nothing, "Asian"), nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing), FHIRClient.R4Types.Extension(nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity", nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, FHIRClient.R4Types.CodeableConcept(nothing, FHIRClient.R4Types.AbstractCoding[FHIRClient.R4Types.Coding(nothing, nothing, nothing, nothing, nothing, "2186-5", "Not Hispanic or Latino", FHIRClient.R4Types.AbstractExtension[], nothing, "2.16.840.1.113883.5.50", nothing, nothing)], FHIRClient.R4Types.AbstractExtension[], nothing, "Not Hispanic or Latino"), nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing), FHIRClient.R4Types.Extension(nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, "http://hl7.org/fhir/StructureDefinition/us-core-birth-sex", nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, FHIRClient.R4Types.CodeableConcept(nothing, FHIRClient.R4Types.AbstractCoding[FHIRClient.R4Types.Coding(nothing, nothing, nothing, nothing, nothing, "M", "Male", FHIRClient.R4Types.AbstractExtension[], nothing, "http://hl7.org/fhir/v3/AdministrativeGender", nothing, nothing)], FHIRClient.R4Types.AbstractExtension[], nothing, "Male"), nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing, nothing)], "male", FHIRClient.R4Types.AbstractReference[], "1476056", FHIRClient.R4Types.AbstractIdentifier[FHIRClient.R4Types.Identifier(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, "urn:oid:1.2.840.114350.1.13.327.1.7.5.737384.0", nothing, "usual", "E3826"), FHIRClient.R4Types.Identifier(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, "urn:oid:1.2.3.4", nothing, "usual", "203579")], nothing, nothing, FHIRClient.R4Types.AbstractPatient_Link[], nothing, FHIRClient.R4Types.CodeableConcept(nothing, FHIRClient.R4Types.AbstractCoding[FHIRClient.R4Types.Coding(nothing, nothing, nothing, nothing, nothing, "S", "Never Married", FHIRClient.R4Types.AbstractExtension[], nothing, "http://hl7.org/fhir/ValueSet/marital-status", nothing, nothing)], FHIRClient.R4Types.AbstractExtension[], nothing, "Single"), FHIRClient.R4Types.Meta(nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, TimeZones.ZonedDateTime(2020, 9, 21, 16, 26, 42, 55, tz"UTC"), String[], FHIRClient.R4Types.AbstractCoding[], "#BkkjG8tIAryKje9w", FHIRClient.R4Types.AbstractCoding[FHIRClient.R4Types.Coding(nothing, nothing, nothing, nothing, nothing, "MR", nothing, FHIRClient.R4Types.AbstractExtension[], nothing, "http://hl7.org/fhir/v2/0203", nothing, nothing)], "1"), FHIRClient.R4Types.AbstractExtension[], nothing, nothing, FHIRClient.R4Types.AbstractHumanName[FHIRClient.R4Types.HumanName(nothing, FHIRClient.R4Types.AbstractElement[], FHIRClient.R4Types.AbstractElement[], FHIRClient.R4Types.AbstractElement[], nothing, nothing, FHIRClient.R4Types.AbstractExtension[], "Argonaut", ["Jason"], nothing, nothing, String[], String[], "Jason Argonaut", "usual")], FHIRClient.R4Types.AbstractAttachment[], "Patient", FHIRClient.R4Types.AbstractContactPoint[FHIRClient.R4Types.ContactPoint(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, nothing, "phone", "home", "608-271-9000"), FHIRClient.R4Types.ContactPoint(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, nothing, "phone", "work", "608-771-9000"), FHIRClient.R4Types.ContactPoint(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, nothing, "phone", "mobile", "608-771-9000"), FHIRClient.R4Types.ContactPoint(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, nothing, "fax", "home", "608-771-9000"), FHIRClient.R4Types.ContactPoint(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, FHIRClient.R4Types.Period(nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, FHIRClient.R4Types.FHIRDateTime("\"2011-08-04T00:00:00Z\"")), nothing, "phone", "temp", "608-771-9000"), FHIRClient.R4Types.ContactPoint(nothing, nothing, nothing, nothing, FHIRClient.R4Types.AbstractExtension[], nothing, nothing, nothing, "email", nothing, "open@epic.com")], FHIRClient.R4Types.Narrative(nothing, "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Jason <b>ARGONAUT </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>E3826</td></tr><tr><td>Address</td><td><span>1979 Milky Way Dr. </span><br/><span>Verona </span><span>WI </span><span>US </span></td></tr><tr><td>Date of birth</td><td><span>01 August 1985</span></td></tr></tbody></table></div>", FHIRClient.R4Types.AbstractExtension[], nothing, "generated"))
julia> typeof(p)FHIRClient.R4Types.Patient
julia> fieldnames(Patient)(:_active, :_birthDate, :_deceasedBoolean, :_deceasedDateTime, :_gender, :_implicitRules, :_language, :_multipleBirthBoolean, :_multipleBirthInteger, :active, :address, :birthDate, :communication, :contact, :contained, :deceasedBoolean, :deceasedDateTime, :extension, :gender, :generalPractitioner, :id, :identifier, :implicitRules, :language, :link, :managingOrganization, :maritalStatus, :meta, :modifierExtension, :multipleBirthBoolean, :multipleBirthInteger, :name, :photo, :resourceType, :telecom, :text)
julia> p.name1-element Vector{FHIRClient.R4Types.AbstractHumanName}: - FHIRClient.R4Types.HumanName(nothing, FHIRClient.R4Types.AbstractElement[], FHIRClient.R4Types.AbstractElement[], FHIRClient.R4Types.AbstractElement[], nothing, nothing, FHIRClient.R4Types.AbstractExtension[], "Argonaut", ["Jason"], nothing, nothing, String[], String[], "Jason Argonaut", "usual")
+ FHIRClient.R4Types.HumanName(nothing, FHIRClient.R4Types.AbstractElement[], FHIRClient.R4Types.AbstractElement[], FHIRClient.R4Types.AbstractElement[], nothing, nothing, FHIRClient.R4Types.AbstractExtension[], "Argonaut", ["Jason"], nothing, nothing, String[], String[], "Jason Argonaut", "usual") diff --git a/dev/generate/index.html b/dev/generate/index.html index d65822b..0511c5e 100644 --- a/dev/generate/index.html +++ b/dev/generate/index.html @@ -1,4 +1,4 @@ Auto-generating the type definitions · FHIRClient.jl

Auto-generating the type definitions

Example usage

julia> using Generate
julia> fhir_version = :R4:R4
julia> url = "https://www.hl7.org/fhir/$(fhir_version)/definitions.json.zip""https://www.hl7.org/fhir/R4/definitions.json.zip"
julia> json_definitions = Generate.download_fhir_json_schema(url);
julia> schema_string = json_definitions["fhir.schema.json.zip"]["fhir.schema.json"];
julia> output_file = "autogenerated-$(fhir_version).jl""autogenerated-R4.jl"
julia> Generate.output_fhir_types(; schema_string = schema_string, output_file = output_file)[ Info: Successfully wrote content to: /home/runner/work/FHIRClient.jl/FHIRClient.jl/docs/build/autogenerated-R4.jl "/home/runner/work/FHIRClient.jl/FHIRClient.jl/docs/build/autogenerated-R4.jl"

Index

Docs

Generate.download_fhir_json_schemaMethod
download_fhir_json_schema(url::AbstractString)

Download and unzip the file at url.

Example

julia> url = "https://www.hl7.org/fhir/R4/definitions.json.zip"
-julia> Generate.download_fhir_json_schema(url)
source
+julia> Generate.download_fhir_json_schema(url)source
Generate.output_fhir_typesMethod
output_fhir_types(; output_file, schema_string)

Generate the FHIR types and save them in the specified output file.

source
diff --git a/dev/index.html b/dev/index.html index 3707b8b..bec4bb6 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · FHIRClient.jl

FHIRClient

FHIRClient provides a Julia client for connecting to servers that support the Fast Healthcare Interoperability Resources (FHIR) specification and building SMART on FHIR applications.

The source code for this package is available in the GitHub repository.

The following tables show the mapping between Julia packages and standards/specifications:

Julia PackageStandard/SpecificationDescription
FHIRClient.jlFHIRFast Healthcare Interoperability Resources. Web standard for health interop.
SMARTAppLaunch.jlSMART App LaunchUser-facing apps that connect to EHRs and health portals.
SMARTBackendServices.jlSMART Backend ServicesServer-to-server FHIR connections.

We currently do not implement the following; however, we plan to implement them in the future:

Standard/SpecificationDescription
FHIR Bulk Data Access (Flat FHIR)FHIR export API for large-scale data access.

These descriptions are taken from the SMART on FHIR technical documentation.

+Home · FHIRClient.jl

FHIRClient

FHIRClient provides a Julia client for connecting to servers that support the Fast Healthcare Interoperability Resources (FHIR) specification and building SMART on FHIR applications.

The source code for this package is available in the GitHub repository.

The following tables show the mapping between Julia packages and standards/specifications:

Julia PackageStandard/SpecificationDescription
FHIRClient.jlFHIRFast Healthcare Interoperability Resources. Web standard for health interop.
SMARTAppLaunch.jlSMART App LaunchUser-facing apps that connect to EHRs and health portals.
SMARTBackendServices.jlSMART Backend ServicesServer-to-server FHIR connections.

We currently do not implement the following; however, we plan to implement them in the future:

Standard/SpecificationDescription
FHIR Bulk Data Access (Flat FHIR)FHIR export API for large-scale data access.

These descriptions are taken from the SMART on FHIR technical documentation.

diff --git a/dev/installation/index.html b/dev/installation/index.html index 8cc9344..74acac3 100644 --- a/dev/installation/index.html +++ b/dev/installation/index.html @@ -1,4 +1,4 @@ Installing FHIRClient · FHIRClient.jl

Installing FHIRClient

To install FHIRClient, open Julia and run the following commands:

julia> import Pkg
 
-julia> Pkg.add("FHIRClient")
+julia> Pkg.add("FHIRClient")