Class TbsFHIRClient
Unit
bsFHIRClient
Declaration
type TbsFHIRClient = class(TComponent)
Description
Creates a new client using a default url
Parameters
- AURL
- The URL of the server to connect to.
If the trailing '/' is not present, then it will be appended automatically
Hierarchy
Overview
Methods
Properties
Description
Methods
|
constructor Create(AOwner: TComponent); overload; override; |
|
|
constructor Create(const AURL:String); overload; |
|
|
destructor Destroy; override; |
|
|
function CreateResource(AResourceName:String; AData:String ):String; overload; |
|
|
function CreateResource(AResource:TBSFHIRObject):String; overload; |
|
|
function ReadResource(AResourceName:String; AId:String): TBSFHIRObject; overload; |
|
|
function ReadResourceV(AResourceName:String; AId,AVersionNo:String): TBSFHIRObject; |
|
|
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
|
|
function DeleteResource(AResource:TBSFHIRObject):Boolean; overload; |
|
|
function DeleteResource(AResourceName:String; AId:String): Boolean; overload; |
|
|
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 |
|
function Search(AResourceName:String; AConditionalParams: TStrings): TBSFHIRObject; overload; |
Search for Resources based on criteria specified in a Query resource
Parameters
- AResourceName
- The type of resource to filter on (optional). If not specified, will search on all resource types.
- AConditionalParams
- 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. |
|
function Search(AResourceName:String; AParam:String): TBSFHIRObject; overload; |
|
Properties
|
property IndyHttp: TIdHTTP read FIndy write SetIndy; |
|
|
property LastResponseCode: Integer read FLastResponseCode; |
|
|
property LastResponseText : String Read FLastResponseText; |
|
|
property ResponseHeaders: TStringList read FResponseHeaders; |
|
Generated by PasDoc 0.15.0.
|