generated from NHSDigital/api-management-service-template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
electronic-prescription-service-api.yaml
1619 lines (1530 loc) · 91.4 KB
/
electronic-prescription-service-api.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# This is an OpenAPI Specification (https://swagger.io/specification/)
# for the Electronic Prescription Service (EPS) API
# owned by NHS Digital (https://digital.nhs.uk/)
openapi: 3.0.0
x-nhs-api-spec-guid: 5ead5713-9d2b-46eb-8626-def5fd2a2350
info:
title: Electronic Prescription Service (FHIR) API
version: "{VERSION}"
contact:
name: Electronic Prescription Service FHIR API Support
url: "https://digital.nhs.uk/developer/help-and-support"
email: "[email protected]"
description: |
## Overview
<style>.codeinline.example {word-wrap: anywhere;}</style>
Use this API to access the [Electronic Prescription Service (EPS)](https://digital.nhs.uk/services/electronic-prescription-service). EPS is the national service used to send electronic prescription messages between prescribers and community dispensers.
If you are using this API in [user-restricted mode](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis) a healthcare worker must be present and authenticated with an [NHS smartcard or a modern alternative](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers) to use this API.
### Prescribers in primary and secondary care can:
* create a prescription
* encode data so the prescription is ready to sign
* cancel a prescription
Creating and cancelling a prescription are both done by the prescriber. Encoding data so the prescription is ready to sign is done by the prescribing system.
### Dispensers can:
* download an individual prescription from EPS
* download a batch of prescriptions from EPS
* return a prescription to EPS
* submit a dispense notification to EPS
* withdraw a dispense notification from EPS
* submit a dispense claim
You cannot currently use this API to:
* view a prescription's detailed dispense history
## Who can use this API
This API can only be used where there is a legal basis to do so. Make sure you have a [valid use case](https://digital.nhs.uk/services/electronic-prescription-service/enabling-eps-for-your-service) before you go too far with your development.
You must get approval before you can go live. For more information, see the 'Onboarding' section.
## Related APIs, services and documentation
### Services
These services must be used alongside EPS to create a functioning prescribing or dispensing system.
* [Care Identity Service 2 (CIS2)](https://digital.nhs.uk/services/identity-and-access-management/national-care-identity-service) - use this to authenticate prescribers with their smartcard.
* [Directory of Services (DOS)](https://digital.nhs.uk/services/directory-of-services-dos) - prescribers must use the DOS to find dispensing sites for patients.
* [Organisation Data Service (ODS)](https://digital.nhs.uk/developer/api-catalogue/organisation-data-service-fhir) - use this to access ODS codes for prescribing organisations.
* [Personal Demographics Service (PDS)](https://digital.nhs.uk/developer/api-catalogue/personal-demographics-service-fhir) - use PDS to synchronise a patient's demographic details including their name, date of birth and address.
* [Digital Signature Service](https://digital.nhs.uk/developer/api-catalogue/signing-service) - use the signing service API to create signatures for prescriptions. The signing service is only used for EPS.
* [Role-Based Access Controls (RBAC)](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/national-rbac-for-developers) - RBAC rules are stored in the National RBAC Database (NRD) and are used to limit what prescribers can and cannot do.
* [GP2GP](https://digital.nhs.uk/services/gp2gp) - use the GP2GP service to transfer patient details, including nominated dispensers, between GPs.
* [Message Exchange for Social Care and Health (MESH)](https://digital.nhs.uk/developer/api-catalogue/message-exchange-for-social-care-and-health-api) - Use MESH to deliver and receive cancel responses.
* [Prescription Tracker](https://developer.nhs.uk/apis/eps-tracker) - use this if you want a read-only interface to get information about a patient's prescriptions.
* [Real-Time Exemption Checking](https://nhsconnect.github.io/prescription-exemptions/) - dispensing systems must use the Real-Time Exemption Checking service to prevent prescriptions fraud and enable effective processing of charge exemptions.
### Documentation
This documentation provides important context
* [Dictionary of Medicines and Devices (DM+D)](https://www.nhsbsa.nhs.uk/pharmacies-gp-practices-and-appliance-contractors/dictionary-medicines-and-devices-dmd) - the dm+d has the names, descriptions and unique identifiers for medicines and devices that can be prescribed.
* [Requirements and Guidance for Endorsement in the Electronic Prescription Service (EPS)](https://www.nhsbsa.nhs.uk/sites/default/files/2023-03/NHSBSAGuidanceforEndorsement_v8.0.pdf) - guidance on handling prescription types, prescription endorsements, and patient charge exemptions within EPS.
### Guidance for developers and product owners
Documentation and guidance about EPS for technical and non-technical audiences
* [Simplifier implementation guide for digital medicines](https://simplifier.net/guide/ukcoreimplementationguideformedicines?version=current) - the implementation guide contains detailed information and example messages, error codes and processes. This is for technical audiences like developers.
* [Building healthcare software - prescriptions](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/prescriptions) - this explains how to build software that deals with prescriptions. This is for non-technical audiences like product owners.
## API status and roadmap
The immediate priority of EPS development is to support the rollout of the next-gen FHIR APIs for primary care and secondary care prescribing and dispensing.
### Prescribing
The API supports prescribers in primary and secondary care settings. This means prescriptions are sent from a GP or NHS hospital to a pharmacy. For these workflows, the API is [in production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).
* it is available in integration and production
* we might make breaking changes, but only if we cannot avoid it, and we will give advance notice
### Dispensing
This API supports a community pharmacy dispensing workflow.
In a community pharmacy workflow, prescriptions can be released (downloaded) from EPS, updated, dispensed, and then claimed by the pharmacy. For this workflow, the API is [in production](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#statuses).
- it is available in integration and production
- we might make breaking changes, but only if we cannot avoid it, and we will give advance notice
### Roadmap
To see our roadmap, or to suggest, comment or vote on features for this API, see our [interactive product backlog](https://nhs-digital-api-management.featureupvote.com/?tag=eps-fhir-api).
If you have any other queries, please [contact us](https://digital.nhs.uk/developer/help-and-support).
## Service level
This API is a platinum service, meaning it is operational and supported 24 hours a day, 365 days a year.
For more details, see [service levels](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#service-levels).
## Technology
This API is [RESTful](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#basic-rest).
It conforms to the [FHIR](https://digital.nhs.uk/developer/guides-and-documentation/our-api-technologies#fhir) global standard for health care data exchange, specifically to [FHIR R4 (v4.0.1)](https://hl7.org/fhir/r4/), except that it does not support the [capabilities](http://hl7.org/fhir/R4/http.html#capabilities) interaction.
It includes some country-specific FHIR extensions, which are built against [FHIR UK Core, specifically [UKcore.stu1 0.5.1](https://simplifier.net/packages/fhir.r4.ukcore.stu1/0.5.1).
You do not need to know much about FHIR to use this API - FHIR APIs are just RESTful APIs that follow specific rules. In particular:
* resource names are capitalised and singular, for example `/Patient` not `/patients`
* array names are singular, for example `line` not `lines` for address lines
* data items that are country-specific and thus not included in the FHIR global base resources are usually wrapped in an `extension` object
There are [libraries and software development kits available](https://digital.nhs.uk/developer/guides-and-documentation/api-technologies-at-nhs-digital#fhir-libraries-and-sdks) to help with FHIR API integration.
## Network access
This API is available on the internet and, indirectly, on the [Health and Social Care Network (HSCN)](https://digital.nhs.uk/services/health-and-social-care-network).
To use this API with [NHS smartcards](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers), the end user needs an HSCN connection, although internet-facing alternatives to smartcards are available.
For more details see [Network access for APIs](https://digital.nhs.uk/developer/guides-and-documentation/network-access-for-apis).
## Security and authorisation
This API has 2 access modes:
* user-restricted access
* application-restricted access
### User-restricted access
The EPS APIs are mostly [user-restricted](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation#user-restricted-apis),
meaning we authenticate the end user.
EPS only supports [CIS2 separate authentication and authorisation](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/user-restricted-restful-apis-nhs-cis2-separate-authentication-and-authorisation),
do not use combined authentication and authorisation.
The only interaction that is not user-restricted is releasing nominated prescriptions.
### Application-restricted access
Use this access mode to release nominated prescriptions while dispensing.
To use this access mode, use the following security pattern:
* [Application-restricted RESTful API - signed JWT authentication](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication)
## Environment and testing
| Environment | Base URL |
|------------------|---------------------------------------------------------------------|
| Sandbox | `https://sandbox.api.service.nhs.uk/electronic-prescriptions` |
| Integration test | `https://int.api.service.nhs.uk/electronic-prescriptions` |
| Production | `https://api.service.nhs.uk/electronic-prescriptions` |
### Sandbox testing
Our [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing):
* is for early developer testing
* only covers a limited set of scenarios
* is stateless, so it does not actually persist any updates
* is open access, so does not allow you to test authorisation
For details of sandbox testing, or to try out the sandbox using our "Try this API" feature, see the documentation for each endpoint.
### Integration testing
Our [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):
* is for formal integration testing
* is stateful, so persists updates
* includes authorisation, with [smartcard](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/nhs-smartcards-for-developers) and non-smartcard options
For more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).
## Onboarding
Your software must be approved by us before you can begin the EPS onboarding process and go live with this FHIR API. EPS 'onboarding' is the term used for the development and assurance required before IT suppliers can offer EPS to NHS organisations.
Details of the onboarding process can be found on our [EPS onboarding and assurance for IT suppliers](https://digital.nhs.uk/services/electronic-prescription-service/guidance-for-developers/onboarding-and-assurance) page.
## Resources
Use the [Digital Medicines Implementation Guide](https://simplifier.net/guide/NHSDigital-Medicines) to assist with your integration.
This is the FHIR specification for Digital Medicines starting with the assets required for an electronic prescription sent to the EPS.
For further guidance on prescribing, see [EPS prescribing developer guide](https://digital.nhs.uk/developer/guides-and-documentation/building-healthcare-software/prescriptions/eps-prescriber-developer-guide).
## Errors
### Verification errors
| HTTP Status | Error Code | Example Diagnostic | Description | Endpoints |
|-------------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| 400 | value | Incorrect FHIR resource type. Expected Bundle. | Body's `resourceType` not the expected value. | `/$prepare`, `/$process-message`, `/Claim`, `/Task/$release`, `/Task` |
| 400 | value | MessageHeader.eventCoding.code must be one of: prescription-order, prescription-order-update, dispense-notification. | MessageHeader's `eventCoding.code` is not supported. | `/$prepare` |
| 400 | value | MedicationRequest.intent must be order, original-order or instance-order. | Bundle contains a plan or reflex. Only order, original-order and instance-order are supported. | `/$prepare`, `/$process-message` |
| 400 | value | Expected all MedicationRequests to have the same value for dispenseRequest.performer. Received ["1f8cb914-feb0-4ef8-b676-bf2dfa5ac47d", "8b676178-768c-445a-98a9-bea45931fcd8"]. | A MedicationRequest field that should be consistent has multiple unique values across requests. | `/$prepare`, `/$process-message` |
| 400 | value | Bundle resource Practitioner.identifier expected exactly one professional code from GMC/NMC/GPhC/HCPC/professional-code. | Practitioner contains a gmp-number identifier, which is invalid. | `/$prepare` |
| 400 | value | Expected all MedicationRequests to have a different value for identifier. | MedicationRequests contains a duplicate identifier. | `/$prepare` |
| 400 | value | Task.status must be one of: 'in-progress', 'rejected' | Specified field must be one of the listed values. | `/Task` |
| 400 | value | Task.code is required when Task.status is 'in-progress'. | Specified field is missing. | `/Task` |
| 400 | value | Task.reasonCode must have a system of 'https://fhir.nhs.uk/CodeSystem/EPS-task-dispense-return-status-reason' and a value from that system. | Specified field is missing a required system. | `/Task` |
| 400 | value | The Bundle must contain exactly one MedicationRequest if MessageHeader.eventCoding.code is 'prescription-order-update'. | The requested operation can only be performed on a single medication request. | `/$process-message` |
| 400 | value | Expected MedicationRequest to have a value for statusReason. | Specified field is missing. | `/$process-message` |
| 400 | not-supported | Prescribing functionality is disabled. | Requested operation is not enabled/supported. | `/$prepare`, `/Claim`, `/Task/$release`, `/Task` |
| 400 | structure | MedicationRequest cannot contain both medicationReference and medicationCodeableConcept fields. | MedicationRequest contains both `medicationReference` and `medicationCodeableConcept` fields. | `/$prepare`, `/$process-message` |
| 400 | invalid | practitionerRole.practitioner populated incorrectly. Please populate with Reference to resource within Bundle. | The specified field should be a reference but is not. | `/$prepare`, `/$process-message` |
| 400 | invalid | Parameters.parameter("agent").resource.practitioner populated incorrectly. Please populate with Identifier and Display. | The specified field should not be a reference but is. | `/Claim`, `/Task/$release`, `/Task` |
| 400 | invalid | Unexpected field of practitionerRole.healthcareService. | Specified field is provided when it should not have been. | `/$prepare`, `/$process-message` |
| 400 | invalid | Required field organization.partOf is missing. | Specified field is not provided when it should have been. | `/$prepare`, `/$process-message` |
| 400 | invalid | Required parameter owner is missing. | Specified parameter is not provided when it should have been. | `/Task/$release` |
| 400 | invalid | The claim is missing the required endorsement code. | The necessary endorsement code is not included in the claim request. | `/Claim` |
| 400 | invalid | The dispense notification is missing the reimbursement authority and it should be provided. | The necessary extension containing the reimbursement authority is missing and it should be provided. | `/$process-message`, `#dispense-notification` |
| 400 | invalid | The dispense notification is missing the ODS code for the reimbursement authority and it should be provided. | The necessary ODS code is not included in the dispense notification and it should be provided. | `/$process-message`, `#dispense-notification` |
| 500 | invalid | *N/A* | An internal error occurred. Details should be specified in attached OperationOutcome. | `/$prepare`, `/Claim`, `/Task/$release`, `/Task` |
| 403 | forbidden | Your app does not have permission to access prescribing functionality. | App does not have permission to use the requested function. | `/$prepare`, `/$process-message`, `/Claim`, `/Task/$release`, `/Task` |
| 403 | forbidden | Dispensing functionality can only be accessed using the user-restricted access mode. | The requested function requires user-restricted access mode. | `/$prepare`, `/$process-message`, `/Claim`, `/Task/$release`, `/Task` |
### System Errors
#### Prescribing Errors
| Error Code | EPS Issue Code | Description | Endpoints |
|------------|---------------------------|-----------------------------------------------------------------------------|---------------------|
| invalid | *N/A* | A generic error occurred. | `/$prepare` |
| duplicate | DUPLICATE_PRESCRIPTION_ID | A prescription with the same ID already exists. | `/$prepare` |
| invalid | TOO_FEW_VALUES_SUBMITTED | A mandatory value is missing, or an insufficient number have been provided. | `/$process-message` |
#### Nominated Release Errors
| Error Code | EPS Issue Code | Description | Endpoints |
|---------------|-----------------------|---------------------------------------------------------|------------------|
| invalid | *N/A* | A generic error occurred. | `/Task/$release` |
| informational | NO_MORE_PRESCRIPTIONS | No more prescriptions available for nominated download. | `/Task/$release` |
#### Cancellation Errors
| Error Code | EPS Issue Code | Description | Endpoints |
|------------|------------------------|---------------------------------------------------------------------------------------------|---------------------|
| invalid | *N/A* | A generic error occurred. | `/$process-message` |
| not-found | PRESCRIPTION_NOT_FOUND | The requested prescription could not be found. | `/$process-message` |
| *N/A* | R-0002 | Prescription was with dispenser so not cancelled, but marked for cancellation. | `/$process-message` |
| *N/A* | R-0003 | Prescription was with dispenser active so not cancelled, but marked for cancellation. | `/$process-message` |
| *N/A* | R-0004 | Prescription was not cancelled as it has been dispensed. | `/$process-message` |
| *N/A* | R-0005 | Prescription was not cancelled as it has expired. | `/$process-message` |
| *N/A* | R-0006 | Prescription has already been cancelled. | `/$process-message` |
| *N/A* | R-0007 | Cancellation already requested by another prescriber. | `/$process-message` |
| not-found | R-0008 | Prescription not found. | `/$process-message` |
| *N/A* | R-0010 | Prescription was not cancelled as it has been not dispensed. | `/$process-message` |
| processing | R-5000 | Unable to process message. Possibly due to a mismatch of NHS Numbers or prescription ID's. | `/$process-message` |
#### Dispensing Errors
| Error Code | EPS Issue Code | Description | Endpoints |
|---------------|--------------------------------------------|------------------------------------------------------------------------------------------------|--------------------------------------------------|
| invalid | *N/A* | A generic error occurred. | `/Claim`, `/Task/$release`, `/Task` |
| not-found | PRESCRIPTION_NOT_FOUND | The requested prescription could not be found. | `/Claim`, `/Task/$release`, `/Task` |
| business-rule | PRESCRIPTION_WITH_ANOTHER_DISPENSER | The requested prescription is with another dispenser. | `/Task` |
| business-rule | PRESCRIPTION_INVALID_STATE_TRANSITION | The requested operation is not valid for the current state of the prescription. | `/Task/$release`, `/Task` |
| business-rule | PRESCRIPTION_INVALID_LINE_STATE_TRANSITION | The requested operation is not valid for the current state of the prescription. | `/Task/$release`, `/Claim` |
| not-found | ITEM_NOT_FOUND | The requested item could not be found. | `/Task/$release`, `/Claim` |
| business-rule | MISMATCH_AUTHORISED_REPEAT_COUNTS | The repeat count in this message does not match the repeat count in the original prescription. | `/Task/$release`, `/Claim` |
| business-rule | DISPENSE_AMEND_IDENTIFIER_MISMATCH | Replacement target does not match existing claim reference on record. | `/Claim` |
| business-rule | CLAIM_AMEND_PERIOD_ISSUE | Claim amendment is not permitted outside of the claim period. | `/Claim` |
| structure | INVALID_MESSAGE | The message is not valid. | `/Claim` |
| processing | FAILURE_TO_PROCESS_MESSAGE | An unexpected error occurred while processing the message. | `/Task` |
### Platform wide errors
| HTTP Status | Error Code | Description |
| ------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| 401 | ACCESS_DENIED | User does not have permission for a particular request. |
| 403 | FORBIDDEN | Insufficient authorization. |
| 404 | NOT_FOUND | Route not found. |
| 500 | INTERNAL SERVER ERROR | The server has encountered a situation it does not know how to handle. |
| 504 | GATEWAY_TIMEOUT | If your request has not been fully processed within 59 seconds, you will get this response. Retry the request with identical payload. |
For further details on common error codes, see [HTTP status codes](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes)
x-spec-publication:
operation-order:
- operations:
- method: POST
path: /FHIR/R4/$prepare
- method: POST
path: /FHIR/R4/$process-message#prescription-order
- method: POST
path: /FHIR/R4/$process-message#prescription-order-update
- method: POST
path: /FHIR/R4/Task/$release
- method: POST
path: /FHIR/R4/$process-message#dispense-notification
- method: POST
path: /FHIR/R4/Claim
- method: POST
path: /FHIR/R4/Task#return
- method: POST
path: /FHIR/R4/Task#withdraw
servers:
- url: "https://sandbox.api.service.nhs.uk/electronic-prescriptions"
description: "Sandbox"
- url: "https://int.api.service.nhs.uk/electronic-prescriptions"
description: "Integration test"
tags:
- name: prescribing
- name: dispensing
paths:
/FHIR/R4/$prepare:
post:
operationId: prepare-prescription
summary: Encode prescription data so it's ready to sign - Prescribing
description: |
## Overview
Use this endpoint to convert an unsigned FHIR prescription into the piece of data that needs to be digitally signed.
This action is done by the prescribing system and API, not the prescriber.
To generate a Provenance resource, guidance can be found at this link [here](https://digital.nhs.uk/services/electronic-prescription-service/guidance-for-developers/how-to-embed-a-signature-within-a-prescription).
tags:
- prescribing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/Encode-Request-Bundle"
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care prepare request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/1-Prepare-Request-200_OK.json
acute-multiple-dosages:
summary: Acute Multiple Dosages
description: A valid acute, primary care prescription order request, with multiple dosage items.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/Prepare-Request-Multiple-Dosages-200_OK.json
repeat-primary:
summary: Repeat
description: A Valid repeat, primary care prepare request
value:
$ref: examples/primary-care/repeat-prescribing/1-Prepare-Request-200_OK.json
eRD-primary:
summary: eRD
description: a Valid eRD, primary care prepare request.
value:
$ref: examples/spec/prepare/eRD-primary-example-req.json
responsible-party-org:
summary: Responsible practitioner org
description: A valid example with an organisation as the responsible practitioner.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/responsible-party-org/3-Prepare-Request-200_OK.json
responses:
"200":
description: Successful conversion.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/parameters-response"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care prepare request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/1-Prepare-Response-200_OK.json
acute-multiple-dosages:
summary: Acute Multiple Dosages
description: A successful response to an acute with multiple dosages, primary care prescription order request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/Prepare-Response-Multiple-Dosages-200_OK.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care request.
value:
$ref: examples/primary-care/repeat-prescribing/1-Prepare-Response-200_OK.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care prepare request.
value:
$ref: examples/spec/prepare/eRD-primary-example-res.json
responsible-party-org:
summary: eRD
description: A successful response to a eRD, primary care prepare request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/responsible-party-org/3-Prepare-Response-200_OK.json
"4XX":
description: Invalid request.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
example:
description: |
An error response to a prepare request.
value:
$ref: examples/spec/errors/example-a-validation-error-missing-field/Response-FhirError.json
/FHIR/R4/$process-message#prescription-order:
post:
operationId: send-prescription-order-message
summary: Create a new prescription - Prescribing
description: |
## Overview
Use this endpoint to create a new prescription in EPS.
The prescription must include a digital signature, which can be generated using the [Signing Service](https://digital.nhs.uk/developer/api-catalogue/signing-service).
The `#prescription-order` in the URL has been added to distinguish this from the other operations which
can be performed using the [`$process-message` endpoint](https://simplifier.net/guide/NHSDigital/Home/FHIRAssets/AllAssets/OperationDefinition/process-message). It is not required in requests to the API.
The only difference between the prepare requests and create request should be the inclusion of the provenance resource.
To generate a Provenance resource, guidance can be found at this link [here](https://digital.nhs.uk/services/electronic-prescription-service/guidance-for-developers/how-to-embed-a-signature-within-a-prescription).
tags:
- prescribing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/Create-Request-Bundle"
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care prescription order request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/1-Process-Request-Send-200_OK.json
acute-multiple-dosages:
summary: Acute Multiple Dosages
description: A valid acute, primary care prescription order request, with multiple dosage items.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/3-Process-Request-Multiple-DosageInstructions-Send_200_OK.json
repeat-primary:
summary: Repeat
description: A valid repeat, primary care prescription order request.
value:
$ref: examples/primary-care/repeat-prescribing/1-Process-Request-Send-200_OK.json
eRD-primary:
summary: eRD
description: A valid eRD, primary care prescription order request.
value:
$ref: examples/spec/prescribing/prescription-order/eRD-primary-example-req.json
responsible-party-org:
summary: Responsible practitioner org
description: A valid example with an organisation as the responsible practitioner.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/responsible-party-org/3-Process-Request-Send-200_OK.json
description: ""
responses:
"200":
description: Successfully submitted.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care prescription order request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/1-Process-Response-Send-200_OK.json
acute-multiple-dosages:
summary: Acute Multiple Dosages
description: A successful response to an acute with multiple dosages, primary care prescription order request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/3-Process-Response-Multiple-DosageInstructions-Send_200_OK.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care prescription order request.
value:
$ref: examples/primary-care/repeat-prescribing/1-Process-Response-Send-200_OK.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care prescription order request.
value:
$ref: examples/spec/prescribing/prescription-order/eRD-primary-example-res.json
responsible-party-org:
summary: eRD
description: A successful response to a eRD, primary care prepare request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/responsible-party-org/3-Process-Response-Send-200_OK.json
"4XX":
description: |
An error occurred as follows:
| HTTP status | Error code | Description |
|-------------|----------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| 400 | DUPLICATE_PRESCRIPTION_ID | Duplicate prescription ID exists. |
| 400 | FAILURE_TO_PROCESS_MESSAGE | Unable to process message for example where the prescription ID has an invalid checksum or an invalid NHS number is passed. |
| 400 | MISSING_DIGITAL_SIGNATURE | Digital signature not found. |
| 400 | MISSING_VALUE | The request contains multiple dosage instruction lines but no corresponding dosage sequence number. |
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
OperationOutcome:
description: |
An error response.
value:
$ref: examples/spec/errors/example-a-validation-error-missing-field/Response-FhirError.json
/FHIR/R4/$process-message#prescription-order-update:
post:
operationId: send-prescription-order-update-message
summary: Cancel a prescription - Prescribing
description: |
## Overview
Use this endpoint to cancel a prescription.
The effect of calling this endpoint depends on the type of the message, which is determined by the `MessageHeader` resource.
To cancel a prescription, send a [prescription-order-update message](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/MessageDefinition-duplicate-2/prescription-order-update).
The `#prescription-order-update` in the URL has been added to distinguish this from the other operations which
can be performed using the [`$process-message` endpoint](https://simplifier.net/guide/NHSDigital/Home/FHIRAssets/AllAssets/OperationDefinition/process-message). It is not required in requests to the API.
tags:
- prescribing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/Cancel-Request-Bundle"
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care prescription order update request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/cancellations/2-Process-Request-Cancel-200_OK.json
repeat-primary:
summary: Repeat
description: A valid repeat, primary care prescription order update request.
value:
$ref: examples/spec/prescribing/prescription-order-update/repeat-primary-example-req.json
eRD-primary:
summary: eRD
description: A valid eRD, primary care prescription order update request.
value:
$ref: examples/spec/prescribing/prescription-order-update/eRD-primary-example-req.json
responsible-party-org:
summary: Responsible practitioner org
description: A valid example with an organisation as the responsible practitioner.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/responsible-party-org/cancellations/3-Process-Request-Cancel-200_OK.json
description: ""
responses:
"200":
description: |
Successfully submitted.
Note that both successful and unsuccessful cancel responses will be successfully processed.
| HTTP status | Response code | Description |
| ----------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------|
| 200 | R-0001 | Prescription or item was cancelled. |
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/Cancel-Response-Bundle"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care prescription order update request.
value:
$ref: examples/primary-care/acute/nominated-pharmacy/medical-prescriber/cancellations/2-Process-Response-Cancel-200_OK.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care prescription order update request.
value:
$ref: examples/spec/prescribing/prescription-order-update/repeat-primary-example-res.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care prescription order update request.
value:
$ref: examples/spec/prescribing/prescription-order-update/eRD-primary-example-res.json
"4XX":
description: |
An error occurred as follows:
| HTTP status | Error code | Description |
|-------------|-------------|------------------------------------------------------------------------------------------|
| 400 | R-0002 | Prescription or item was not cancelled. With dispenser. Marked for cancellation. |
| 400 | R-0003 | Prescription or item was not cancelled. With dispenser active. Marked for cancellation. |
| 400 | R-0004 | Prescription or item was not cancelled. Prescription has been dispensed. |
| 400 | R-0005 | Prescription or item had expired. |
| 400 | R-0006 | Prescription or item had already been cancelled. |
| 400 | R-0007 | Prescription or item cancellation requested by another prescriber. |
| 400 | R-0010 | Prescription or item was not cancelled. Prescription has been not dispensed. |
| 400 | R-0008 | Prescription or item not found. |
| 400 | R-5000 | Unable to process message due to invalid information within the cancel request. |
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
OperationOutcome:
description: |
An error response.
value:
$ref: examples/spec/errors/example-a-validation-error-missing-field/Response-FhirError.json
/FHIR/R4/Task/$release:
post:
operationId: release
summary: Download prescriptions - Dispensing
description: |
## Overview
Use this endpoint to download prescriptions from EPS that are available for dispensing.
You can download a single prescription using the prescription's ID,
or download up to 25 prescriptions (per request) nominated to a dispenser using the dispenser's ODS code.
Send a [Task-release message](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/OperationDefinition-duplicate-2/release-duplicate-2) to this endpoint to download the prescription.
tags:
- dispensing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
$ref: "schemas/requests/dispensing/Release.yaml#/components/schemas/Release"
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care release request.
value:
$ref: examples/spec/dispensing/release/acute-primary-example-req.json
repeat-primary:
summary: Repeat
description: A Valid repeat, primary care release request
value:
$ref: examples/spec/dispensing/release/repeat-primary-example-req.json
eRD-primary:
summary: eRD
description: a Valid eRD, primary care release request.
value:
$ref: examples/spec/dispensing/release/eRD-primary-example-req.json
responses:
"200":
description: Successfully downloaded a prescription for dispensing.
content:
application/fhir+json:
schema:
$ref: "schemas/responses/dispensing/Release.yaml"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care release request.
value:
$ref: examples/spec/dispensing/release/acute-primary-example-res.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care release request.
value:
$ref: examples/spec/dispensing/release/repeat-primary-example-res.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care prepare release request.
value:
$ref: examples/spec/dispensing/release/eRD-primary-example-res.json
"4XX":
description: |
An error occurred as follows:
| HTTP status | Error code | Description |
| ----------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------|
| 400 | PRESCRIPTION_WITH_ANOTHER_DISPENSER | Another dispenser has previously released this prescription. Details of the prescription will be in OperationOutcome.contained.Organization . |
| 400 | RESOURCE_NOT_FOUND | The prescription ID specified in the parameters requested (group-identifier) did not exist. |
content:
application/fhir+json:
schema:
type: object
examples:
not-found:
description: |
An error response due to requested prescription not being found.
value:
$ref: examples/spec/errors/release/not-found-error.json
with-another-dispenser:
description: |
An error response due to the prescription being released by another dispenser.
value:
$ref: examples/spec/errors/release/with-another-dispenser-error.json
/FHIR/R4/Task#return:
post:
operationId: return
summary: Return a downloaded prescription - Dispensing
description: |
## Overview
Use this endpoint to return a downloaded prescription to EPS, so that another dispensing system can download it.
The effect of calling this endpoint depends on the Task status.
To return a downloaded prescription to EPS, send a Task with a status of `rejected`.
For more information on how to create these messages, see [NHSDigital-Task](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/Profiles/NHSDigital-Task).
Note that the `#return` in the URL has been added to distinguish this from the other operations which
can be performed using the `Task` endpoint. It is not required in requests to the API.
tags:
- dispensing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
type: object
description: The request to return a downloaded prescription, expressed as a [Task FHIR resource](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/Profiles/NHSDigital-Task).
$ref: schemas/requests/dispensing/Return.yaml
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care return request.
value:
$ref: examples/spec/dispensing/return/acute-primary-example-req.json
repeat-primary:
summary: Repeat
description: A valid repeat, primary care return request.
value:
$ref: examples/spec/dispensing/return/repeat-primary-example-req.json
eRD-primary:
summary: eRD
description: a Valid eRD, primary care return request.
value:
$ref: examples/spec/dispensing/return/eRD-primary-example-req.json
responses:
"200":
description: Action completed successfully.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care return request.
value:
$ref: examples/spec/dispensing/return/acute-primary-example-res.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care return request.
value:
$ref: examples/spec/dispensing/return/repeat-primary-example-res.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care return request.
value:
$ref: examples/spec/dispensing/return/eRD-primary-example-res.json
"4XX":
description: |
An error occurred as follows:
| HTTP status | Error code | Description |
|-------------|----------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| 400 | INVALID_STATE_TRANSITION | Invalid State Transition for Prescription. |
| 400 | PRESCRIPTION_NOT_FOUND | Prescription not found. |
| 400 | INVALID_MESSAGE | Invalid Message. |
| 400 | UNABLE_TO_PROCESS_MESSAGE | Unable to process message. Information missing or invalid. |
| 400 | MAX_REPEAT_MISMATCH | Mismatch in authorised repeat counts. |
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
example:
description: |
An error response to a return request.
value:
$ref: examples/spec/errors/release/not-found-error.json
/FHIR/R4/$process-message#dispense-notification:
post:
operationId: send-dispense-notification-message
summary: Mark a prescription as dispensed - Dispensing
description: |
## Overview
### Dispense notification
Use this endpoint to send a dispense notification to EPS.
The effect of calling this endpoint depends on the type of the message, which is determined by the `MessageHeader` resource.
To mark a prescription as partially or fully dispensed, send a [dispense-notification message](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/MessageDefinition-duplicate-2/dispense-notification).
Note that the `#dispense-notification` in the URL has been added to distinguish this from the other operations which
can be performed using the [`$process-message` endpoint](https://simplifier.net/guide/NHSDigital/Home/FHIRAssets/AllAssets/OperationDefinition/process-message). It is not required in requests to the API.
### Amend dispense notification
The same endpoint can be used to amend a previous dispense notification. The same message structure is used with the addition of a `replacementOf` extension in the MessageHeader,
referencing the identifier of the previous dispense notification to be amended. Only the most recent dispense notification can be amended. To amend other dispense notifications please use the Withdraw endpoint, to withdraw all dispense notifications issued after the amend target, and then amend if necessary.
More information can be found on the fhir [documentation](https://simplifier.net/guide/NHSDigital/Home/FHIRAssets/AllAssets/Profiles/NHSDigital-MessageHeader).
tags:
- dispensing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
$ref: "schemas/requests/dispensing/DispenseNotification.yaml"
type: object
description: |
The dispense notification, amendment to a previous dispense notification, expressed as a [dispense-notification FHIR message](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/MessageDefinition-duplicate-2/dispense-notification).
If amending a previous dispense notification, include the `replacementOf` extension.
examples:
acute-primary-01:
summary: Acute 01
description: A valid acute, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/acute-primary-example-01-req.json
acute-primary-02:
summary: Acute 02
description: A valid acute, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/acute-primary-example-02-req.json
acute-primary-03:
summary: Acute 03
description: A valid acute, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/acute-primary-example-03-req.json
acute-primary-04:
summary: Acute 04
description: A valid acute, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/acute-primary-example-04-req.json
repeat-primary:
summary: Repeat
description: A valid repeat, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/repeat-primary-example-req.json
eRD-primary:
summary: eRD
description: a Valid eRD, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/eRD-primary-example-req.json
description: ""
responses:
"200":
description: Successfully submitted.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/acute-primary-example-res.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/repeat-primary-example-res.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care dispense notification request.
value:
$ref: examples/spec/dispensing/dispense-notification/eRD-primary-example-res.json
"4XX":
description: Invalid request.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
OperationOutcome:
description: |
An error response.
value:
$ref: examples/spec/errors/example-a-validation-error-missing-field/Response-FhirError.json
/FHIR/R4/Task#withdraw:
post:
operationId: withdraw
summary: Withdraw a dispense notification - Dispensing
description: |
## Overview
Use this endpoint to withdraw a dispense notification, for example in the case that a prescription was marked as dispensed erroneously.
The effect of calling this endpoint depends on the Task status.
To withdraw a dispense notification from EPS, send a Task with a status of `in-progress`.
For more information on how to create these messages, see [NHSDigital-Task](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/Profiles/NHSDigital-Task).
Note that the `#withdraw` in the URL has been added to distinguish this from the other operations which
can be performed using the `Task` endpoint. It is not required in requests to the API.
This interaction is only available in the sandbox environment.
tags:
- dispensing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
type: object
description: The request to withdraw a dispense notification, expressed as a [Task FHIR resource](https://simplifier.net/guide/NHSDigital-Medicines/Home/FHIRAssets/AllAssets/Profiles/NHSDigital-Task).
$ref: schemas/requests/dispensing/Withdraw.yaml
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care withdraw request.
value:
$ref: examples/spec/dispensing/withdraw/acute-primary-example-req.json
repeat-primary:
summary: Repeat
description: A valid repeat, primary care withdraw request.
value:
$ref: examples/spec/dispensing/withdraw/repeat-primary-example-req.json
eRD-primary:
summary: eRD
description: a Valid eRD, primary care withdraw request.
value:
$ref: examples/spec/dispensing/withdraw/eRD-primary-example-req.json
responses:
"200":
description: Action completed successfully.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
acute-primary:
summary: Acute
description: A successful response to an acute, primary care withdraw request.
value:
$ref: examples/spec/dispensing/withdraw/acute-primary-example-res.json
repeat-primary:
summary: Repeat
description: A successful response to a repeat, primary care withdraw request.
value:
$ref: examples/spec/dispensing/withdraw/repeat-primary-example-res.json
eRD-primary:
summary: eRD
description: A successful response to a eRD, primary care withdraw request.
value:
$ref: examples/spec/dispensing/withdraw/eRD-primary-example-res.json
"4XX":
description: Invalid request.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples:
example:
description: |
An error response to a withdraw request.
value:
$ref: examples/spec/errors/release/not-found-error.json
/FHIR/R4/Claim:
post:
operationId: send-dispense-claim-message
summary: Claim for a dispensed prescription - Dispensing
description: |
## Overview
### Claim
Use this endpoint to submit or amend a reimbursement claim for a dispensed prescription.
tags:
- dispensing
parameters:
- $ref: "#/components/parameters/BearerAuthorization"
- $ref: "#/components/parameters/RoleId"
- $ref: "#/components/parameters/RequestID"
- $ref: "#/components/parameters/CorrelationID"
requestBody:
required: true
content:
application/fhir+json:
schema:
$ref: "schemas/requests/dispensing/DispenseClaim.yaml"
examples:
acute-primary:
summary: Acute
description: A valid acute, primary care claim request.
value:
$ref: examples/spec/dispensing/claim/acute-primary-example-req.json
repeat-primary:
summary: Repeat
description: A valid repeat, primary care claim request.
value:
$ref: examples/spec/dispensing/claim/repeat-primary-example-req.json
eRD-primary:
summary: eRD
description: a Valid eRD, primary care claim request.
value:
$ref: examples/spec/dispensing/claim/eRD-primary-example-req.json
description: ""
responses:
"200":
description: Successfully submitted.
content:
application/fhir+json:
schema:
$ref: "#/components/schemas/operation-outcome"
examples: