Skip to content

Commit

Permalink
retrieve use cases
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusfearnett-nhsdigital committed Jun 30, 2024
1 parent ec7315a commit 3deedfa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 84 deletions.
40 changes: 8 additions & 32 deletions input/pagecontent/retrieve-fgm-flag-record.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ For high level requirements, see [Key purposes of the FGM Flag](index.html#fgm-k

### Usecase

An FGM Flag Record may be retrieved if it exists. It will be possible to determine that an flags exist by searching for a [Patient Flag](StructureDefinition-PatientFlag.html) with:
An FGM Flag Record may be retrieved if it exists. It will be possible to determine that an flags exist by searching for a [Patient Flag](StructureDefinition-PatientFlag.html) with the code [FGM](CodeSystem-PatientFlagCategory.html#PatientFlagCategory-FGM)

-

Expand All @@ -30,10 +30,10 @@ Using [FHIR search](https://www.hl7.org/fhir/search.html) capabilities, it is po

This section describes how to query from the [Patient](http://www.hl7.org/fhir/R4/patient.html#search) endpoint using [FHIR search](https://www.hl7.org/fhir/search.html)

This will return all associated flag resources for Reasonable Adjustments.
This will return all associated flag resources for Female Genital Mutilation records.

```
GET /Patient?identifier=9912003888&_has:Flag:patient:code=NRAF&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient&_has:Consent:patient:category=NRAF&_revinclude=Consent:patient&_has:Condition:patient:category=NRAF&_revinclude=Condition:patient
GET /Patient?identifier=9912003888&_has:Flag:patient:code=FGM
```

This limits the search to patients thant have the identifier `9912003888`
Expand All @@ -42,35 +42,17 @@ This limits the search to patients thant have the identifier `9912003888`
identifier=9912003888
```

This limits the search to patients that have Flag resources linked via patient and have the code NRAF, and also includes the resource in the returned searchset Bundle.
This limits the search to patients that have Flag resources linked via patient and have the code FGM, and also includes the resource in the returned searchset Bundle.

```
&_has:Flag:patient:code=NRAF&_revinclude=Flag:patient
&_has:Flag:patient:code=FGM&_revinclude=Flag:patient
```

This limits the search to patients that have Flag resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient
```

This limits the search to patients that have Consent resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Consent:patient:category=NRAF&_revinclude=Consent:patient
```

This limits the search to patients that have Condition resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Condition:patient:category=NRAF&_revinclude=Condition:patient
```

The following queries will return all or some of the resources constituing a Reasonable Adjustments record, i.e.
The following queries will return all or some of the resources constituing a Female Genital Mutilation record:

* [Patient Flag](StructureDefinition-PatientFlag.html) resources
* [Programme Flag](StructureDefinition-ProgrammeFlag.html) resources
* [Flag Condition](StructureDefinition-FlagCondition.html) resources


This query relies on the [FlagCategory](SearchParameter-FlagCategory.html) and [FlagCode](SearchParameter-FlagCode.html) SearchParameters.

Expand All @@ -80,15 +62,9 @@ This section describes how to query from the [Flag](http://www.hl7.org/fhir/R4/f

**NOTE:** For every additional record/resource added, the flag-detail element in the Patient Flag resource will need updated. See **TODO -- link to add interaction diagram**.

<div id="todo-notice" markdown="span" class="alert alert-danger" role="alert">
<i class="fa fa-tasks"></i>
<b>TODO: </b>
<i>Update all interaction diagrams that either add or remove records. Also add new specific diagrams for adding an additional record or removing a single record from a set, where the flag extension then needs updated :(</i>
</div>

If the [flag-detail extension](http://hl7.org/fhir/StructureDefinition/flag-detail) is used, then references to all Reasonable Adjustment resources can be included the [Patient Flag](StructureDefinition-PatientFlag.html) resource.

This will return all associated flag resources for Reasonable Adjustments.
This will return all associated flag resources for Female Genital Mutilation records.

```
http://localhost:8080/fhir/Flag?patient.identifier=9912003888&_include=Flag:detail&_include=Flag:patient
Expand Down
42 changes: 6 additions & 36 deletions input/pagecontent/retrieve-patient-flag-record.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,47 +32,23 @@ Using [FHIR search](https://www.hl7.org/fhir/search.html) capabilities, it is po

This section describes how to query from the [Patient](http://www.hl7.org/fhir/R4/patient.html#search) endpoint using [FHIR search](https://www.hl7.org/fhir/search.html)

This will return all associated flag resources for Reasonable Adjustments.

```
GET /Patient?identifier=9912003888&_has:Flag:patient:code=NRAF&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient&_has:Consent:patient:category=NRAF&_revinclude=Consent:patient&_has:Condition:patient:category=NRAF&_revinclude=Condition:patient
```

This limits the search to patients thant have the identifier `9912003888`
This will return all associated Flag resources for Patient Flag.

```
identifier=9912003888
GET /PatientFlag?patient=9449306753
```

This limits the search to patients that have Flag resources linked via patient and have the code NRAF, and also includes the resource in the returned searchset Bundle.
This limits the search to Flags for the patient that has the identifier `9449306753`

```
&_has:Flag:patient:code=NRAF&_revinclude=Flag:patient
patient=9449306753
```

This limits the search to patients that have Flag resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient
```

This limits the search to patients that have Consent resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Consent:patient:category=NRAF&_revinclude=Consent:patient
```

This limits the search to patients that have Condition resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Condition:patient:category=NRAF&_revinclude=Condition:patient
```

The following queries will return all or some of the resources constituing a Reasonable Adjustments record, i.e.
The following queries will return all or some of the resources constituing a Patient Flag record, i.e.

* [Patient Flag](StructureDefinition-PatientFlag.html) resources
* [Programme Flag](StructureDefinition-ProgrammeFlag.html) resources
* [Flag Condition](StructureDefinition-FlagCondition.html) resources
* Any Additional Supporting resources

This query relies on the [FlagCategory](SearchParameter-FlagCategory.html) and [FlagCode](SearchParameter-FlagCode.html) SearchParameters.

Expand All @@ -82,12 +58,6 @@ This section describes how to query from the [Flag](http://www.hl7.org/fhir/R4/f

**NOTE:** For every additional record/resource added, the flag-detail element in the Patient Flag resource will need updated. See **TODO -- link to add interaction diagram**.

<div id="todo-notice" markdown="span" class="alert alert-danger" role="alert">
<i class="fa fa-tasks"></i>
<b>TODO: </b>
<i>Update all interaction diagrams that either add or remove records. Also add new specific diagrams for adding an additional record or removing a single record from a set, where the flag extension then needs updated :(</i>
</div>

If the [flag-detail extension](http://hl7.org/fhir/StructureDefinition/flag-detail) is used, then references to all Reasonable Adjustment resources can be included the [Patient Flag](StructureDefinition-PatientFlag.html) resource.

This will return all associated flag resources for Reasonable Adjustments.
Expand Down
18 changes: 2 additions & 16 deletions input/pagecontent/retrieve-reasonable-adjustment-record.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
### Overview

Patient consent must be obtained before retrieving any adjustment or impairment. See [Consent to Share Information](consent-to-share-information.html) for details of requirements around consent.

For high level requirements, see [Key purposes of the Reasonable Adjustment Flag](index.html#ra-key-purposes)

### Usecase

After obtaining consent from a patient, a Reasonable Adjustment Record may be retrieved if it exists. It will be possible to determine that a adjustment flags exist by searching for a [Patient Flag](StructureDefinition-PatientFlag.html) with the code [NRAF](CodeSystem-PatientFlagCategory.html#PatientFlagCategory-NRAF), or [Programme Flags](StructureDefinition-ProgrammeFlag.html) with a category of [NRAF](CodeSystem-PatientFlagCategory.html#PatientFlagCategory-NRAF).
A Reasonable Adjustment Record may be retrieved if it exists. It will be possible to determine that a adjustment flags exist by searching for a [Patient Flag](StructureDefinition-PatientFlag.html) with the code [NRAF](CodeSystem-PatientFlagCategory.html#PatientFlagCategory-NRAF), or [Programme Flags](StructureDefinition-ProgrammeFlag.html) with a category of [NRAF](CodeSystem-PatientFlagCategory.html#PatientFlagCategory-NRAF).

<div style="text-align: left;">

Expand All @@ -33,7 +31,7 @@ This section describes how to query from the [Patient](http://www.hl7.org/fhir/R
This will return all associated flag resources for Reasonable Adjustments.

```
GET /Patient?identifier=9912003888&_has:Flag:patient:code=NRAF&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient&_has:Consent:patient:category=NRAF&_revinclude=Consent:patient&_has:Condition:patient:category=NRAF&_revinclude=Condition:patient
GET /Patient?identifier=9912003888&_has:Flag:patient:code=NRAF&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient&_has:Condition:patient:category=NRAF&_revinclude=Condition:patient
```

This limits the search to patients thant have the identifier `9912003888`
Expand All @@ -54,12 +52,6 @@ This limits the search to patients that have Flag resources linked via patient a
&_has:Flag:patient:category=NRAF&_revinclude=Flag:patient
```

This limits the search to patients that have Consent resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
&_has:Consent:patient:category=NRAF&_revinclude=Consent:patient
```

This limits the search to patients that have Condition resources linked via patient and have the category NRAF, and also includes the resource in the returned searchset Bundle.

```
Expand All @@ -80,12 +72,6 @@ This section describes how to query from the [Flag](http://www.hl7.org/fhir/R4/f

**NOTE:** For every additional record/resource added, the flag-detail element in the Patient Flag resource will need updated. See **TODO -- link to add interaction diagram**.

<div id="todo-notice" markdown="span" class="alert alert-danger" role="alert">
<i class="fa fa-tasks"></i>
<b>TODO: </b>
<i>Update all interaction diagrams that either add or remove records. Also add new specific diagrams for adding an additional record or removing a single record from a set, where the flag extension then needs updated :(</i>
</div>

If the [flag-detail extension](http://hl7.org/fhir/StructureDefinition/flag-detail) is used, then references to all Reasonable Adjustment resources can be included the [Patient Flag](StructureDefinition-PatientFlag.html) resource.

This will return all associated flag resources for Reasonable Adjustments.
Expand Down

0 comments on commit 3deedfa

Please sign in to comment.