Class TbsFHIRClient

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TbsFHIRClient = class(TObject)

Description

Creates a new client using a default url

The URL of the server to connect to.
If the trailing '/' is not present, then it will be appended automatically )

Hierarchy

  • TObject
  • TbsFHIRClient

Overview

Methods

Public constructor Create; overload;
Public constructor Create(const AURL:String); overload;
Public function CreateResource(AResourceName:String; AData:String ):String; overload;
Public function CreateResource(AResource:TBSFHIRObject):String; overload;
Public function ReadResource(AResource:TBSFHIRObject; AId:String): TBSFHIRObject; overload;
Public function ReadResource(AResourceName:String; AId:String): TBSFHIRObject; overload;
Public function UpdateResource(AResource:TBSFHIRObject): Boolean; overload;
Public function DeleteResource(AResource:TBSFHIRObject):Boolean; overload;
Public function DeleteResource(AResourceName:String; AId:String): Boolean; overload;
Public function DeleteResource(AResource:String; AConditionalParams: TStringList):Boolean; overload;
Public function Search(AResourceName:String; AConditionalParams: TStrings): TBSFHIRObject; overload;
Public function Search(AResourceName:String; AParam:String): TBSFHIRObject; overload;

Description

Methods

Public constructor Create; overload;
 
Public constructor Create(const AURL:String); overload;
 
Public function CreateResource(AResourceName:String; AData:String ):String; overload;
 
Public function CreateResource(AResource:TBSFHIRObject):String; overload;
 
Public function ReadResource(AResource:TBSFHIRObject; AId:String): TBSFHIRObject; overload;
 
Public function ReadResource(AResourceName:String; AId:String): TBSFHIRObject; overload;
 
Public function UpdateResource(AResource:TBSFHIRObject): Boolean; overload;

For the Create interaction you can have the server check if an equivalent resource already exists, based on the search parameters: var created_pat_A = client.Create<Patient>(pat, conditions); If no matches are found, the resource will be created. If one match is found, the server will not create the resource and will return an HTTP 200 (OK). In both cases created_pat_A will contain the resource that was sent back by the server, unless you set the FhirClient to ask for the minimal representation. When multiple resources match the conditions, the server will return an error.

procedure Create(AResource:String; AConditionalParams: TStringList); overload

Public function DeleteResource(AResource:TBSFHIRObject):Boolean; overload;
 
Public function DeleteResource(AResourceName:String; AId:String): Boolean; overload;
 
Public function DeleteResource(AResource:String; AConditionalParams: TStringList):Boolean; overload;

The conditional Delete takes a string as first argument, indicating the resource type. The search parameters are passed as second argument: client.Delete("Patient", AConditionalParams); When no match is found, the server will return an error. If one match is found, that resource will be deleted. The server may choose to delete all resources if multiple instances match, or it may return an error.

Returns

Is Deleted

Public function Search(AResourceName:String; AConditionalParams: TStrings): TBSFHIRObject; overload;

Search for Resources based on criteria specified in a Query resource

The type of resource to filter on (optional). If not specified, will search on all resource types.)

The Query resource containing the search parameters)

Returns

A Bundle with all resources found by the search, or an empty Bundle if none were found.

Public function Search(AResourceName:String; AParam:String): TBSFHIRObject; overload;
 

Generated by PasDoc 0.14.0.