(cli:fhir)=
# FHIR subcommands

```{list-table} FHIR subcommands
:header-rows: 1

* - Subcommand
  - Description
  - Argument
* - `list`
  - Display a list of existing FHIR resources of the specified resource type.
  - `resource_type STR`  
  Specify the FHIR resource type, e.g. `Patient`, `Observation`, `Subscription` (required).  
  `output {json,table}`  
  Specify the output format of the stdout file (optional, default = json).
* - `get`
  - Display the information for a specified FHIR resource.
  - `resource_type STR`  
  Specify the FHIR resource type, e.g. `Patient`, `Observation`, `Subscription` (required).  
  `id STR`  
  Specify the FHIR resource ID (required).
* - `create`
  - Create a new FHIR resource of the specified resource type.
  - `resource_type STR`  
  Specify the FHIR resource type, e.g. `Patient`, `Observation`, `Subscription` (required).  
  `data STR`  
  Specify the FHIR resource payload as an inline JSON string (required if `--file` is not given).  
  `file STR`  
  Specify the path to a JSON file containing the FHIR resource payload (required if `--data` is not given).
* - `update`
  - Update an existing FHIR resource. The full resource payload is required.
  - `resource_type STR`  
  Specify the FHIR resource type, e.g. `Patient`, `Observation`, `Subscription` (required).  
  `id STR`  
  Specify the FHIR resource ID (required).  
  `data STR`  
  Specify the FHIR resource payload as an inline JSON string (required if `--file` is not given).  
  `file STR`  
  Specify the path to a JSON file containing the FHIR resource payload (required if `--data` is not given).  
  `if_match STR`  
  Specify the expected version of the resource to guard against concurrent updates, e.g. `1` or `W/"1"` (optional).
* - `delete`
  - Delete the specified FHIR resource.
  - `resource_type STR`  
  Specify the FHIR resource type, e.g. `Patient`, `Observation`, `Subscription` (required).  
  `id STR`  
  Specify the FHIR resource ID (required).  
  `if_match STR`  
  Specify the expected version of the resource to guard against concurrent updates, e.g. `1` or `W/"1"` (optional).

```

```{note}
FHIR resource type names are case-sensitive and must start with an uppercase letter (for example, `Patient`, `Observation`, `Subscription`).
```
