Skip to content

Commit bec8b4e

Browse files
Documentation updates for moving from NHAIS to PCRM (#283)
1 parent 6841ad2 commit bec8b4e

File tree

7 files changed

+748
-343
lines changed

7 files changed

+748
-343
lines changed

INBOUND.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ are additional parameters consisting of name/value pairs.
5151

5252
### Data Items for FHIR Message Types
5353

54-
REQUIRED - NHAIS will always provide this value for the transaction and the adaptor will always translated it FHIR
55-
OPTIONAL - NHAIS may optionally provide this value for the transaction and the adaptor will translate it to FHIR if provided
54+
REQUIRED - PCRM/NHAIS will always provide this value for the transaction and the adaptor will always translate it FHIR
55+
OPTIONAL - PCRM/NHAIS may optionally provide this value for the transaction and the adaptor will translate it to FHIR if provided
5656
BLANK - the value is not used by this transaction type
5757

5858
| Data Item | Approval | Rejection | FP69 Prior Notification | FP69 Flag Removal | Deduction | Deduction Request Rejection |
@@ -191,8 +191,8 @@ GP Links Specification Chapter 3.22.4 lists data fields and their requirements f
191191
The inbound Amendment transaction uses a JSONPatch data type instead of FHIR. The format is very similar to outbound
192192
amendments with two exceptions:
193193

194-
* NHAIS may provide a new NHS number
195-
* NHAIS never provides free text notes
194+
* PCRM/NHAIS may provide a new NHS number
195+
* PCRM/NHAIS never provides free text notes
196196

197197
The following fields are OBSOLETE and not supported by the adaptor:
198198

OPERATING.md

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
# Operating
22

3-
This document contains requirements and tips for operation the adaptor in a production environment.
3+
This document contains requirements and tips for operating the adaptor in a production environment.
44

55
# AMQP Message Broker Requirements
66

77
* The broker must be configured with a limited number of retries and deadletter queues
8-
* It is the responsibility of the GP supplier to configure adequate monitoring against the deadletter queues that allows ALL undeliverable messages to be investigated fully.
8+
* It is the responsibility of the GP supplier to configure adequate monitoring against the deadletter queues
9+
that allows ALL undeliverable messages to be investigated fully
910
* The broker must use persistent queues to avoid loss of data
10-
* The GP System must persist the relevant transaction data before acknowledging the message from the queue to avoid loss of data
11+
* The GP System must persist the relevant transaction data before acknowledging the message from the queue to avoid
12+
loss of data
1113

1214
**Using AmazonMQ**
1315

1416
* A persistent broker (not in-memory) must be used to avoid data loss.
1517
* A configuration profile that includes settings for [retry and deadlettering](https://activemq.apache.org/message-redelivery-and-dlq-handling.html) must be applied.
16-
* AmazonMQ uses the scheme `amqp+ssl://` but this **MUST** be changed the to `amqps://` when configuring the adaptor.
18+
* AmazonMQ uses the scheme `amqp+ssl://` but this **MUST** be changed to `amqps://` when configuring this adaptor.
1719

1820
**Using Azure Service Bus**
1921

2022
* The ASB must use [MaxDeliveryCount and dead-lettering](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dead-letter-queues#exceeding-maxdeliverycount)
2123
* Azure Service Bus may require some parameters as part of the URL configuration. For example: `NHAIS_AMQP_BROKERS=amqps://<NAME>.servicebus.windows.net/;SharedAccessKeyName=<KEY NAME>;SharedAccessKey=<KEY VALUE>`
2224

23-
# Mongodb Database Requirements
25+
# MongoDB Database Requirements
2426

25-
* The NHAIS Adaptor and NHAIS system communications synchronise through a sequence number mechanism
26-
* The Mongodb database preserves this synchronisation
27-
* Deleting the mongodb database and/or its collections will break the link with the NHAIS system
28-
* The database should be used to monitor for any missing transactions. See [REPORTING.md](./REPORTING.md) for details.
27+
* This GP Links Adaptor and the PCRM/NHAIS system communications are synchronised through a sequence number mechanism
28+
* The MongoDB database preserves this synchronisation
29+
* Deleting the MongoDB database and/or its collections will break the link with the PCRM/NHAIS system
30+
* The database should be used to monitor for any missing transactions. See [REPORTING.md](./REPORTING.md) for details
2931

30-
**Amazon Document DB Tips**
32+
**Amazon DocumentDB Tips**
3133

32-
In the "Connectivity & security" tab of the cluster a URI is provided to "Connect to this cluster with an application".
34+
In the "Connectivity & Security" tab of the cluster a URI is provided to "Connect to this cluster with an application".
3335
Replace <username>:<insertYourPasswordHere> with the actual mongo username and password to be used by the application.
3436
The value of `NHAIS_MONGO_URI` should be set to this value. Since the URI string contains credentials we recommend
3537
managing the entire value as a secured secret.
@@ -38,15 +40,15 @@ The user must have the `readWrite` role or a custom role with specific privilege
3840

3941
**Azure Cosmos DB Tips**
4042

41-
Follow Azure documentation on Cosmos DB's API for MongoDB
43+
Follow Azure documentation on Cosmos DB's API for MongoDB.
4244

4345
## Database Collections
4446

4547
The default database name is `nhais` but this can be changed through an environment variable. Each deployment of the
46-
adaptor MUST have its own database, but multiple database could be hosted by a single cluster. The collection names
48+
adaptor MUST have its own database, but multiple databases could be hosted on a single cluster. The collection names
4749
used by the adaptor cannot be changed.
4850

49-
### Outbound Sequence Ids
51+
### Outbound Sequence IDs
5052

5153
Tracks the sequence numbers used to "link" a GP and to HA using EDIFACT messaging.
5254
See [Linking a GP Practice to an NHAIS system](#linking-a-gp-practice-to-an-nhais-system) section for more information.
@@ -120,7 +122,7 @@ Example:
120122

121123
### Inbound State
122124

123-
Records the metadata of inbound transactions received by the adaptor.
125+
Records the metadata of inbound transactions received by this adaptor.
124126

125127
Collection Name: `inboundState`
126128

@@ -134,7 +136,8 @@ Properties:
134136
* `sndr`: The sender's HA Trading Partner code
135137
* `recip`: The recipient's GP Trading Partner code
136138
* `tn`: The EDIFACT transaction number used for this transaction
137-
* `translationTimestamp`: The timestamp, as reported in the inbound EDIFACT interchange, when the NHAIS system produced the interchange
139+
* `translationTimestamp`: The timestamp, as reported in the inbound EDIFACT interchange, when the PCRM/NHAIS system
140+
produced the interchange
138141
* `transactionType`: Three-letter abbreviation identifying the type of transaction
139142
* `processedTimestamp`: The timestamp when the adaptor processed the transaction
140143
* `conversationId`: The conversation id of the request that initiated this transaction
@@ -184,14 +187,15 @@ Example:
184187
## Time-to-live Indexes
185188

186189
The adaptor creates TTL (time to live) indexes on the `outboundState` and `inboundState` collections to automatically
187-
remove old documents. The variable `NHAIS_MONGO_TTL` described above controls the duration. There are differences between
188-
how TTL indexes work between MongoDb and Azure Cosmos DB. When using Cosmos the `NHAIS_COSMOS_DB_ENABLED` flag must be true.
190+
remove old documents. The variable `NHAIS_MONGO_TTL` described above controls the duration. There are differences
191+
between how TTL indexes work between MongoDb and Azure Cosmos DB. When using Cosmos the `NHAIS_COSMOS_DB_ENABLED` flag
192+
must be true.
189193

190-
**TTL Indexes in MongoDB / AWS Document DB**
194+
**TTL Indexes in MongoDB / AWS DocumentDB**
191195

192196
The property `translationTimestamp` is indexed. For outbound, this is the timestamp when the adaptor translates FHIR
193-
into EDIFACT and is the timestamp enclosed in the EDIFACT interchange sent to NHAIS. For inbound, this is the
194-
timestamp enclosed within the EDIFACT interchange received from NHAIS.
197+
into EDIFACT and is the timestamp enclosed in the EDIFACT interchange sent to PCRM/NHAIS. For inbound, this is the
198+
timestamp enclosed within the EDIFACT interchange received from PCRM/NHAIS.
195199

196200
**TTL Indexes in Azure Cosmos DB**
197201

@@ -202,19 +206,22 @@ last updated timestamp of the resource". ([Reference](https://docs.microsoft.com
202206
For outbound, each document is "last updated" when the adaptor processes the inbound RECEP for that transaction. For
203207
inbound each document is "last updated" after publishing the FHIR message to the inbound GP System message queue.
204208

205-
The impact is that documents in Cosmos may live slightly longer than those stored in Mongo.
209+
The impact is that documents in Cosmos may live slightly longer than those stored in MongoDB.
206210

207211
## AWS DocumentDB TLS configuration
208212

209-
AWS DocumentDB uses a private CA certificate and therefore requires a custom keystore to manage the CA certificates effectively.
213+
AWS DocumentDB uses a private CA certificate and therefore requires a custom keystore to manage the CA certificates
214+
effectively.
210215

211216
To use TLS, it has to be enabled in the DocumentDB instance with the Mongo connection string containing the `tls=true`.
212217
For more information on TLS configuration in MongoDB see [TLS options for Mongo connection string](https://docs.mongodb.com/manual/reference/connection-string/#tls-options).
213218

214-
SSH tunneling might require adding the connection string option: `tlsAllowInvalidHostnames=true` (as CA would try to resolve localhost as hostname).
219+
SSH tunneling might require adding the connection string option: `tlsAllowInvalidHostnames=true` (as CA would try to
220+
resolve localhost as hostname).
215221
This option should only be used for local tests as this might create a vulnerability.
216222

217-
Use of DocumentDB TLS requires java trust store to be provided manually. Instructions on how to create trust store can be found here:
223+
Use of DocumentDB TLS requires java trust store to be provided manually. Instructions on how to create trust store can
224+
be found here:
218225
[Connect to Document DB programmatically](https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html#connect_programmatically-tls_enabled)
219226

220227
To configure custom trust store with AWS CA certificates set the `NHAIS_SSL_TRUST_STORE_URL`
@@ -225,23 +232,23 @@ Additionally, set the `NHAIS_SSL_TRUST_STORE_PASSWORD` to trust store password
225232

226233
# MESH Requirements
227234

228-
**Note**: The "Development" section of the README refers to a fake-mesh component. fake-mesh is **not** part of the
229-
adaptor solution and should only be used to assist local development.
235+
**Note**: The "Development" section of the README refers to a fake-mesh component. fake-mesh is **not** part of this
236+
adaptor API and should only be used to assist local development.
230237

231-
NHSD manage access to MESH, allocate mailboxes, and provide connection details / credentials.
238+
[NHS England manage access to MESH](mailto:[email protected]), allocate mailboxes, and provide connection
239+
details / credentials.
232240

233241
# Management Endpoints
234242

235-
[Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready) provides
236-
three management endpoints:
243+
[Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#production-ready) provides three management endpoints:
237244

238245
* /healthcheck
239246
* /metrics
240247
* /info
241248

242249
# Monitoring GP Links messaging state
243250

244-
There are two Mongo collections recording the state of GP Links transactions:
251+
There are two MongoDB collections recording the state of GP Links transactions:
245252

246253
- `outboundState` records every transaction sent by the adaptor (GP->HA)
247254
- `inboundState` records every transaction received by the adaptor (HA->GP)
@@ -274,19 +281,19 @@ Messages published to the adaptor's three AMQP message queues include a Conversa
274281

275282
# Linking a GP Practice to an NHAIS system
276283

277-
The NHAIS Adaptor and NHAIS system communications synchronise through a sequence number mechanism. Linking a GP
278-
Practice to an NHAIS system which have never previously exchanged messages requires no additional setup for
284+
This GP Links Adaptor and the PCRM/NHAIS system communications are synchronised through a sequence number mechanism.
285+
Linking a GP Practice to an PCRM system which have never previously exchanged messages requires no additional setup for
279286
synchronisation. All the sequences begin at 1, and the adaptor will start them automatically.
280287

281288
In the case that a new market entrant GP System takes over from an incumbent system the new system must pick up the
282-
sequences where the incumbent left off. For every GP/NHAIS link established, the incumbent supplier or NHAIS operator
289+
sequences where the incumbent left off. For every GP/PCRM link established, the incumbent supplier or PCRM operator
283290
must advise the following:
284291

285292
* Most recently used Send Interchange Sequence (SIS) number, GP -> HA
286293
* Most recently used Send Message Sequence (SMS) number, GP -> HA
287294
* Most recently used Transaction Number (TN), GP -> HA
288295

289-
For each GP/NHAIS pair the following documents must be inserted into the `outboundSequenceId` collection of the
296+
For each GP/PCRM pair the following documents must be inserted into the `outboundSequenceId` collection of the
290297
adaptor's database. The angle-bracketed values must be replaced (including the brackets) with the relevant data items.
291298
The `_id` property should have the type `String`, and the `sequenceNumber` property should have the type `int32`. Any
292299
existing documents with the same `_id` must be replaced.

0 commit comments

Comments
 (0)