@@ -60,116 +60,74 @@ def create_error_body(self, params: Optional[dict] = None, **kwargs) -> str:
6060 "fhir_coding" : UKCoreSpineError .VALIDATION_ERROR ,
6161 }
6262
63- """
64- Errors for CreateDocumentRefException
65- """
66- CreateDocNoBody = {"err_code" : "CDR_4001" , "message" : "Missing event body" }
67- CreateDocPayload = {"err_code" : "CDR_4002" , "message" : "Invalid json in body" }
68- CreateDocProps = {
69- "err_code" : "CDR_4003" ,
70- "message" : "Request body missing some properties" ,
71- }
72- CreateDocFiles = {"err_code" : "CDR_4004" , "message" : "Invalid files or id" }
73- CreateDocNoParse = {
74- "err_code" : "CDR_4005" ,
75- "message" : "Failed to parse document upload request data" ,
76- "fhir_coding" : UKCoreSpineError .VALIDATION_ERROR ,
77- }
78- CreateDocNoType = {
79- "err_code" : "CDR_4006" ,
80- "message" : "Failed to parse document upload request data due to missing document type" ,
81- "fhir_coding" : UKCoreSpineError .MISSING_VALUE ,
82- }
83- CreateDocInvalidType = {
84- "err_code" : "CDR_4007" ,
85- "message" : "Failed to parse document upload request data due to invalid document type" ,
86- "fhir_coding" : UKCoreSpineError .INVALID_VALUE ,
87- }
88- CreateDocRecordAlreadyInPlace = {
89- "err_code" : "CDR_4008" ,
90- "message" : "The patient already has a full set of record." ,
91- }
92- CreateDocRefOdsCodeNotAllowed = {
93- "err_code" : "CDR_4009" ,
94- "message" : "ODS code does not match any of the allowed." ,
95- }
96- CreateDocPresign = {
97- "err_code" : "CDR_5001" ,
98- "message" : "An error occurred when creating pre-signed url for document reference" ,
99- }
100- CreateDocUploadInternalError = {
101- "err_code" : "CDR_5002" ,
102- "message" : "An error occurred when creating pre-signed url for document reference" ,
103- }
104- CreatePatientSearchInvalid = {
105- "err_code" : "CDR_5003" ,
106- "message" : "Failed to validate patient" ,
107- "fhir_coding" : UKCoreSpineError .VALIDATION_ERROR ,
108- }
10963
11064 """
111- Errors for UpdateDocumentRefException
65+ Errors for /DocumentReference
11266 """
113- UpdateDocNoBody = {
114- "err_code" : "UDR_4001 " ,
67+ DocRefNoBody = {
68+ "err_code" : "DR_4001 " ,
11569 "message" : "Missing event body" ,
11670 "fhir_coding" : FhirIssueCoding .REQUIRED ,
11771 }
118- UpdateDocPayload = {
119- "err_code" : "UDR_4002 " ,
72+ DocRefPayload = {
73+ "err_code" : "DR_4002 " ,
12074 "message" : "Invalid json in body" ,
12175 "fhir_coding" : FhirIssueCoding .INVALID ,
12276 }
123- UpdateDocProps = {
124- "err_code" : "UDR_4003 " ,
77+ DocRefProps = {
78+ "err_code" : "DR_4003 " ,
12579 "message" : "Request body missing some properties" ,
12680 "fhircoding" : FhirIssueCoding .REQUIRED
12781 }
128- UpdateDocFiles = {
129- "err_code" : "UDR_4004 " ,
82+ DocRefInvalidFiles = {
83+ "err_code" : "DR_4004 " ,
13084 "message" : "Invalid files or id" ,
13185 "fhir_coding" : FhirIssueCoding .INVALID
13286 }
133- UpdateDocNoParse = {
134- "err_code" : "UDR_4005 " ,
87+ DocRefNoParse = {
88+ "err_code" : "DR_4005 " ,
13589 "message" : "Failed to parse document upload request data" ,
13690 "fhir_coding" : UKCoreSpineError .VALIDATION_ERROR ,
13791 }
138- UpdateDocNoType = {
139- "err_code" : "UDR_4006 " ,
92+ DocRefNoType = {
93+ "err_code" : "DR_4006 " ,
14094 "message" : "Failed to parse document upload request data due to missing document type" ,
14195 "fhir_coding" : UKCoreSpineError .MISSING_VALUE ,
14296 }
143- UpdateDocInvalidType = {
144- "err_code" : "UDR_4007 " ,
97+ DocRefInvalidType = {
98+ "err_code" : "DR_4007 " ,
14599 "message" : "Failed to parse document upload request data due to invalid document type" ,
146100 "fhir_coding" : UKCoreSpineError .INVALID_VALUE ,
147101 }
148- UpdateDocRecordAlreadyInPlace = {
149- "err_code" : "UDR_4008 " ,
102+ DocRefRecordAlreadyInPlace = {
103+ "err_code" : "DR_4008 " ,
150104 "message" : "The patient already has a full set of record." ,
151105 "fhir_coding" : FhirIssueCoding .DUPLICATE ,
152106 }
153- UpdateDocRefOdsCodeNotAllowed = {
154- "err_code" : "UDR_4009 " ,
107+ DocRefOdsCodeNotAllowed = {
108+ "err_code" : "DR_4009 " ,
155109 "message" : "ODS code does not match any of the allowed." ,
156110 "fhir_coding" : FhirIssueCoding .INVALID ,
157111 }
158- UpdateDocPresign = {
159- "err_code" : "UDR_5001 " ,
112+ DocRefPresign = {
113+ "err_code" : "DR_5001 " ,
160114 "message" : "An error occurred when creating pre-signed url for document reference" ,
161115 "fhir_coding" : FhirIssueCoding .EXCEPTION ,
162116 }
163- UpdateDocUploadInternalError = {
164- "err_code" : "UDR_5002 " ,
117+ DocRefUploadInternalError = {
118+ "err_code" : "DR_5002 " ,
165119 "message" : "An error occurred when creating pre-signed url for document reference" ,
166120 "fhir_coding" : FhirIssueCoding .EXCEPTION
167121 }
168- UpdatePatientSearchInvalid = {
169- "err_code" : "UDR_5003 " ,
122+ DocRefPatientSearchInvalid = {
123+ "err_code" : "DR_5003 " ,
170124 "message" : "Failed to validate patient" ,
171125 "fhir_coding" : UKCoreSpineError .VALIDATION_ERROR ,
172126 }
127+
128+ """
129+ Errors for Update via /DocumentReference
130+ """
173131 UpdateDocVersionMismatch = {
174132 "err_code" : "UDR_5004" ,
175133 "message" : "Document reference version did not match current document version" ,
0 commit comments