@icure/be-fhc-api 0.4.33 → 0.4.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/fhcRecipeApi.d.ts +33 -11
- package/api/fhcRecipeApi.js +69 -14
- package/model/InvoiceSender.d.ts +1 -0
- package/model/Medication.d.ts +1 -1
- package/model/MemberinsuranceType.d.ts +1 -1
- package/package.json +1 -1
- package/x-api/message-x-api.d.ts +1 -1
- package/x-api/message-x-api.js +13 -10
- package/x-api/utils/efact-util.d.ts +1 -1
- package/x-api/utils/efact-util.js +2 -2
- package/x-api/utils/fhc-invoice-sender-util.d.ts +1 -1
- package/x-api/utils/fhc-invoice-sender-util.js +3 -2
package/api/fhcRecipeApi.d.ts
CHANGED
|
@@ -38,8 +38,10 @@ export declare class fhcRecipeApi {
|
|
|
38
38
|
* @param hcpNihii hcpNihii
|
|
39
39
|
* @param hcpSsin hcpSsin
|
|
40
40
|
* @param hcpName hcpName
|
|
41
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
42
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
41
43
|
*/
|
|
42
|
-
createPrescriptionUsingPOST(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality: string, hcpNihii: string, hcpSsin?: string, hcpName?: string, body?: PrescriptionRequest): Promise<Prescription>;
|
|
44
|
+
createPrescriptionUsingPOST(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality: string, hcpNihii: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string, body?: PrescriptionRequest): Promise<Prescription>;
|
|
43
45
|
/**
|
|
44
46
|
*
|
|
45
47
|
* @summary createPrescriptionV4
|
|
@@ -51,8 +53,10 @@ export declare class fhcRecipeApi {
|
|
|
51
53
|
* @param hcpNihii hcpNihii
|
|
52
54
|
* @param hcpSsin hcpSsin
|
|
53
55
|
* @param hcpName hcpName
|
|
56
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
57
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
54
58
|
*/
|
|
55
|
-
createPrescriptionV4UsingPOST(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality: string, hcpNihii: string, hcpSsin?: string, hcpName?: string, body?: PrescriptionRequest): Promise<Prescription>;
|
|
59
|
+
createPrescriptionV4UsingPOST(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality: string, hcpNihii: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string, body?: PrescriptionRequest): Promise<Prescription>;
|
|
56
60
|
/**
|
|
57
61
|
*
|
|
58
62
|
* @summary getGalToAdministrationUnit
|
|
@@ -70,8 +74,10 @@ export declare class fhcRecipeApi {
|
|
|
70
74
|
* @param hcpQuality hcpQuality
|
|
71
75
|
* @param hcpSsin hcpSsin
|
|
72
76
|
* @param hcpName hcpName
|
|
77
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
78
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
73
79
|
*/
|
|
74
|
-
getPrescriptionMessageUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, rid: string, hcpNihii: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string): Promise<RecipeKmehrmessageType>;
|
|
80
|
+
getPrescriptionMessageUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, rid: string, hcpNihii: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<RecipeKmehrmessageType>;
|
|
75
81
|
/**
|
|
76
82
|
*
|
|
77
83
|
* @summary getPrescriptionStatus
|
|
@@ -80,8 +86,10 @@ export declare class fhcRecipeApi {
|
|
|
80
86
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
81
87
|
* @param hcpNihii hcpNihii
|
|
82
88
|
* @param rid rid
|
|
89
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
90
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
83
91
|
*/
|
|
84
|
-
getPrescriptionStatusUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, rid: string): Promise<GetPrescriptionStatusResult>;
|
|
92
|
+
getPrescriptionStatusUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, rid: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<GetPrescriptionStatusResult>;
|
|
85
93
|
/**
|
|
86
94
|
*
|
|
87
95
|
* @summary getPrescription
|
|
@@ -98,8 +106,10 @@ export declare class fhcRecipeApi {
|
|
|
98
106
|
* @param hcpNihii hcpNihii
|
|
99
107
|
* @param hcpSsin hcpSsin
|
|
100
108
|
* @param hcpName hcpName
|
|
109
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
110
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
101
111
|
*/
|
|
102
|
-
listFeedbacksUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality?: string, hcpNihii?: string, hcpSsin?: string, hcpName?: string): Promise<Array<Feedback>>;
|
|
112
|
+
listFeedbacksUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality?: string, hcpNihii?: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<Array<Feedback>>;
|
|
103
113
|
/**
|
|
104
114
|
*
|
|
105
115
|
* @summary listOpenPrescriptionsByPatient
|
|
@@ -111,8 +121,10 @@ export declare class fhcRecipeApi {
|
|
|
111
121
|
* @param hcpQuality hcpQuality
|
|
112
122
|
* @param hcpSsin hcpSsin
|
|
113
123
|
* @param hcpName hcpName
|
|
124
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
125
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
114
126
|
*/
|
|
115
|
-
listOpenPrescriptionsByPatientUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, patientId: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string): Promise<Array<Prescription>>;
|
|
127
|
+
listOpenPrescriptionsByPatientUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, patientId: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<Array<Prescription>>;
|
|
116
128
|
/**
|
|
117
129
|
*
|
|
118
130
|
* @summary listPrescriptionsByPatient
|
|
@@ -133,8 +145,10 @@ export declare class fhcRecipeApi {
|
|
|
133
145
|
* @param hcpQuality hcpQuality
|
|
134
146
|
* @param hcpSsin hcpSsin
|
|
135
147
|
* @param hcpName hcpName
|
|
148
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
149
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
136
150
|
*/
|
|
137
|
-
listPrescriptionsByPatientUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, patientId: string, prescriberId?: string, from?: number, toInclusive?: number, statuses?: string, expiringFrom?: number, expiringToInclusive?: number, pageYear?: number, pageMonth?: number, pageNumber?: number, hcpQuality?: string, hcpSsin?: string, hcpName?: string): Promise<ListStructuredPrescriptionsResult>;
|
|
151
|
+
listPrescriptionsByPatientUsingGET(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, patientId: string, prescriberId?: string, from?: number, toInclusive?: number, statuses?: string, expiringFrom?: number, expiringToInclusive?: number, pageYear?: number, pageMonth?: number, pageNumber?: number, hcpQuality?: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<ListStructuredPrescriptionsResult>;
|
|
138
152
|
/**
|
|
139
153
|
*
|
|
140
154
|
* @summary revokePrescription
|
|
@@ -147,8 +161,10 @@ export declare class fhcRecipeApi {
|
|
|
147
161
|
* @param hcpQuality hcpQuality
|
|
148
162
|
* @param hcpSsin hcpSsin
|
|
149
163
|
* @param hcpName hcpName
|
|
164
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
165
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
150
166
|
*/
|
|
151
|
-
revokePrescriptionUsingDELETE(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, rid: string, reason: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string): Promise<any | Boolean>;
|
|
167
|
+
revokePrescriptionUsingDELETE(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpNihii: string, rid: string, reason: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<any | Boolean>;
|
|
152
168
|
/**
|
|
153
169
|
*
|
|
154
170
|
* @summary sendNotification
|
|
@@ -163,8 +179,10 @@ export declare class fhcRecipeApi {
|
|
|
163
179
|
* @param executorId executorId
|
|
164
180
|
* @param rid rid
|
|
165
181
|
* @param text text
|
|
182
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
183
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
166
184
|
*/
|
|
167
|
-
sendNotificationUsingPOST(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality: string, hcpNihii: string, hcpSsin: string, hcpName: string, patientId: string, executorId: string, rid: string, text: string): Promise<any | Boolean>;
|
|
185
|
+
sendNotificationUsingPOST(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, hcpQuality: string, hcpNihii: string, hcpSsin: string, hcpName: string, patientId: string, executorId: string, rid: string, text: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<any | Boolean>;
|
|
168
186
|
/**
|
|
169
187
|
*
|
|
170
188
|
* @summary setVision
|
|
@@ -174,8 +192,10 @@ export declare class fhcRecipeApi {
|
|
|
174
192
|
* @param rid rid
|
|
175
193
|
* @param vision vision
|
|
176
194
|
* @param visionOthers visionOthers
|
|
195
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
196
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
177
197
|
*/
|
|
178
|
-
setVisionUsingPUT(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, rid: string, vision: string, visionOthers?: string): Promise<PutVisionResult>;
|
|
198
|
+
setVisionUsingPUT(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, rid: string, vision: string, visionOthers?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<PutVisionResult>;
|
|
179
199
|
/**
|
|
180
200
|
*
|
|
181
201
|
* @summary updateFeedbackFlag
|
|
@@ -188,6 +208,8 @@ export declare class fhcRecipeApi {
|
|
|
188
208
|
* @param hcpQuality hcpQuality
|
|
189
209
|
* @param hcpSsin hcpSsin
|
|
190
210
|
* @param hcpName hcpName
|
|
211
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
212
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
191
213
|
*/
|
|
192
|
-
updateFeedbackFlagUsingPUT(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, rid: string, feedbackFlag: boolean, hcpNihii: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string): Promise<UpdateFeedbackFlagResult>;
|
|
214
|
+
updateFeedbackFlagUsingPUT(xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, rid: string, feedbackFlag: boolean, hcpNihii: string, hcpQuality?: string, hcpSsin?: string, hcpName?: string, xFHCVendorName?: string, xFHCPackageVersion?: string): Promise<UpdateFeedbackFlagResult>;
|
|
193
215
|
}
|
package/api/fhcRecipeApi.js
CHANGED
|
@@ -45,8 +45,10 @@ class fhcRecipeApi {
|
|
|
45
45
|
* @param hcpNihii hcpNihii
|
|
46
46
|
* @param hcpSsin hcpSsin
|
|
47
47
|
* @param hcpName hcpName
|
|
48
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
49
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
48
50
|
*/
|
|
49
|
-
createPrescriptionUsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, body) {
|
|
51
|
+
createPrescriptionUsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion, body) {
|
|
50
52
|
let _body = null;
|
|
51
53
|
_body = body;
|
|
52
54
|
const _url = this.host +
|
|
@@ -64,6 +66,9 @@ class fhcRecipeApi {
|
|
|
64
66
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
65
67
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
66
68
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
69
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
70
|
+
xFHCPackageVersion &&
|
|
71
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
67
72
|
return XHR_1.XHR.sendCommand("POST", _url, headers, _body, this.fetchImpl)
|
|
68
73
|
.then(doc => new Prescription_1.Prescription(doc.body))
|
|
69
74
|
.catch(err => this.handleError(err));
|
|
@@ -79,8 +84,10 @@ class fhcRecipeApi {
|
|
|
79
84
|
* @param hcpNihii hcpNihii
|
|
80
85
|
* @param hcpSsin hcpSsin
|
|
81
86
|
* @param hcpName hcpName
|
|
87
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
88
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
82
89
|
*/
|
|
83
|
-
createPrescriptionV4UsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, body) {
|
|
90
|
+
createPrescriptionV4UsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion, body) {
|
|
84
91
|
let _body = null;
|
|
85
92
|
_body = body;
|
|
86
93
|
const _url = this.host +
|
|
@@ -98,6 +105,9 @@ class fhcRecipeApi {
|
|
|
98
105
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
99
106
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
100
107
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
108
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
109
|
+
xFHCPackageVersion &&
|
|
110
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
101
111
|
return XHR_1.XHR.sendCommand("POST", _url, headers, _body, this.fetchImpl)
|
|
102
112
|
.then(doc => new Prescription_1.Prescription(doc.body))
|
|
103
113
|
.catch(err => this.handleError(err));
|
|
@@ -126,8 +136,10 @@ class fhcRecipeApi {
|
|
|
126
136
|
* @param hcpQuality hcpQuality
|
|
127
137
|
* @param hcpSsin hcpSsin
|
|
128
138
|
* @param hcpName hcpName
|
|
139
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
140
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
129
141
|
*/
|
|
130
|
-
getPrescriptionMessageUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, rid, hcpNihii, hcpQuality, hcpSsin, hcpName) {
|
|
142
|
+
getPrescriptionMessageUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, rid, hcpNihii, hcpQuality, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion) {
|
|
131
143
|
let _body = null;
|
|
132
144
|
const _url = this.host +
|
|
133
145
|
`/recipe/prescription/${encodeURIComponent(String(rid))}` +
|
|
@@ -141,6 +153,9 @@ class fhcRecipeApi {
|
|
|
141
153
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
142
154
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
143
155
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
156
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
157
|
+
xFHCPackageVersion &&
|
|
158
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
144
159
|
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
145
160
|
.then(doc => new RecipeKmehrmessageType_1.RecipeKmehrmessageType(doc.body))
|
|
146
161
|
.catch(err => this.handleError(err));
|
|
@@ -153,8 +168,10 @@ class fhcRecipeApi {
|
|
|
153
168
|
* @param xFHCPassPhrase X-FHC-passPhrase
|
|
154
169
|
* @param hcpNihii hcpNihii
|
|
155
170
|
* @param rid rid
|
|
171
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
172
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
156
173
|
*/
|
|
157
|
-
getPrescriptionStatusUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, rid) {
|
|
174
|
+
getPrescriptionStatusUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, rid, xFHCVendorName, xFHCPackageVersion) {
|
|
158
175
|
let _body = null;
|
|
159
176
|
const _url = this.host +
|
|
160
177
|
`/recipe/${encodeURIComponent(String(rid))}/status` +
|
|
@@ -165,6 +182,9 @@ class fhcRecipeApi {
|
|
|
165
182
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
166
183
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
167
184
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
185
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
186
|
+
xFHCPackageVersion &&
|
|
187
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
168
188
|
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
169
189
|
.then(doc => new GetPrescriptionStatusResult_1.GetPrescriptionStatusResult(doc.body))
|
|
170
190
|
.catch(err => this.handleError(err));
|
|
@@ -192,8 +212,10 @@ class fhcRecipeApi {
|
|
|
192
212
|
* @param hcpNihii hcpNihii
|
|
193
213
|
* @param hcpSsin hcpSsin
|
|
194
214
|
* @param hcpName hcpName
|
|
215
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
216
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
195
217
|
*/
|
|
196
|
-
listFeedbacksUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName) {
|
|
218
|
+
listFeedbacksUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion) {
|
|
197
219
|
let _body = null;
|
|
198
220
|
const _url = this.host +
|
|
199
221
|
`/recipe/all/feedbacks` +
|
|
@@ -207,6 +229,9 @@ class fhcRecipeApi {
|
|
|
207
229
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
208
230
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
209
231
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
232
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
233
|
+
xFHCPackageVersion &&
|
|
234
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
210
235
|
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
211
236
|
.then(doc => doc.body.map(it => new Feedback_1.Feedback(it)))
|
|
212
237
|
.catch(err => this.handleError(err));
|
|
@@ -222,8 +247,10 @@ class fhcRecipeApi {
|
|
|
222
247
|
* @param hcpQuality hcpQuality
|
|
223
248
|
* @param hcpSsin hcpSsin
|
|
224
249
|
* @param hcpName hcpName
|
|
250
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
251
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
225
252
|
*/
|
|
226
|
-
listOpenPrescriptionsByPatientUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, patientId, hcpQuality, hcpSsin, hcpName) {
|
|
253
|
+
listOpenPrescriptionsByPatientUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, patientId, hcpQuality, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion) {
|
|
227
254
|
let _body = null;
|
|
228
255
|
const _url = this.host +
|
|
229
256
|
`/recipe/patient` +
|
|
@@ -238,6 +265,9 @@ class fhcRecipeApi {
|
|
|
238
265
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
239
266
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
240
267
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
268
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
269
|
+
xFHCPackageVersion &&
|
|
270
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
241
271
|
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
242
272
|
.then(doc => doc.body.map(it => new Prescription_1.Prescription(it)))
|
|
243
273
|
.catch(err => this.handleError(err));
|
|
@@ -262,8 +292,10 @@ class fhcRecipeApi {
|
|
|
262
292
|
* @param hcpQuality hcpQuality
|
|
263
293
|
* @param hcpSsin hcpSsin
|
|
264
294
|
* @param hcpName hcpName
|
|
295
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
296
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
265
297
|
*/
|
|
266
|
-
listPrescriptionsByPatientUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, patientId, prescriberId, from, toInclusive, statuses, expiringFrom, expiringToInclusive, pageYear, pageMonth, pageNumber, hcpQuality, hcpSsin, hcpName) {
|
|
298
|
+
listPrescriptionsByPatientUsingGET(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, patientId, prescriberId, from, toInclusive, statuses, expiringFrom, expiringToInclusive, pageYear, pageMonth, pageNumber, hcpQuality, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion) {
|
|
267
299
|
let _body = null;
|
|
268
300
|
const _url = this.host +
|
|
269
301
|
`/recipe/patient/all` +
|
|
@@ -279,9 +311,9 @@ class fhcRecipeApi {
|
|
|
279
311
|
(expiringToInclusive
|
|
280
312
|
? "&expiringToInclusive=" + encodeURIComponent(String(expiringToInclusive))
|
|
281
313
|
: "") +
|
|
282
|
-
(pageYear
|
|
283
|
-
(pageMonth
|
|
284
|
-
(pageNumber
|
|
314
|
+
(pageYear ? "&pageYear=" + encodeURIComponent(String(pageYear)) : "") +
|
|
315
|
+
(pageMonth ? "&pageMonth=" + encodeURIComponent(String(pageMonth)) : "") +
|
|
316
|
+
(pageNumber ? "&pageNumber=" + encodeURIComponent(String(pageNumber)) : "") +
|
|
285
317
|
(hcpQuality ? "&hcpQuality=" + encodeURIComponent(String(hcpQuality)) : "") +
|
|
286
318
|
(hcpSsin ? "&hcpSsin=" + encodeURIComponent(String(hcpSsin)) : "") +
|
|
287
319
|
(hcpName ? "&hcpName=" + encodeURIComponent(String(hcpName)) : "");
|
|
@@ -289,6 +321,9 @@ class fhcRecipeApi {
|
|
|
289
321
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
290
322
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
291
323
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
324
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
325
|
+
xFHCPackageVersion &&
|
|
326
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
292
327
|
return XHR_1.XHR.sendCommand("GET", _url, headers, _body, this.fetchImpl)
|
|
293
328
|
.then(doc => new ListStructuredPrescriptionsResult_1.ListStructuredPrescriptionsResult(doc.body))
|
|
294
329
|
.catch(err => this.handleError(err));
|
|
@@ -305,8 +340,10 @@ class fhcRecipeApi {
|
|
|
305
340
|
* @param hcpQuality hcpQuality
|
|
306
341
|
* @param hcpSsin hcpSsin
|
|
307
342
|
* @param hcpName hcpName
|
|
343
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
344
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
308
345
|
*/
|
|
309
|
-
revokePrescriptionUsingDELETE(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, rid, reason, hcpQuality, hcpSsin, hcpName) {
|
|
346
|
+
revokePrescriptionUsingDELETE(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpNihii, rid, reason, hcpQuality, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion) {
|
|
310
347
|
let _body = null;
|
|
311
348
|
const _url = this.host +
|
|
312
349
|
`/recipe/${encodeURIComponent(String(rid))}` +
|
|
@@ -321,6 +358,9 @@ class fhcRecipeApi {
|
|
|
321
358
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
322
359
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
323
360
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
361
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
362
|
+
xFHCPackageVersion &&
|
|
363
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
324
364
|
return XHR_1.XHR.sendCommand("DELETE", _url, headers, _body, this.fetchImpl)
|
|
325
365
|
.then(doc => true)
|
|
326
366
|
.catch(err => this.handleError(err));
|
|
@@ -339,8 +379,10 @@ class fhcRecipeApi {
|
|
|
339
379
|
* @param executorId executorId
|
|
340
380
|
* @param rid rid
|
|
341
381
|
* @param text text
|
|
382
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
383
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
342
384
|
*/
|
|
343
|
-
sendNotificationUsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, patientId, executorId, rid, text) {
|
|
385
|
+
sendNotificationUsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, hcpQuality, hcpNihii, hcpSsin, hcpName, patientId, executorId, rid, text, xFHCVendorName, xFHCPackageVersion) {
|
|
344
386
|
let _body = null;
|
|
345
387
|
const _url = this.host +
|
|
346
388
|
`/recipe/notify/${encodeURIComponent(String(rid))}` +
|
|
@@ -357,6 +399,9 @@ class fhcRecipeApi {
|
|
|
357
399
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
358
400
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
359
401
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
402
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
403
|
+
xFHCPackageVersion &&
|
|
404
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
360
405
|
return XHR_1.XHR.sendCommand("POST", _url, headers, _body, this.fetchImpl)
|
|
361
406
|
.then(doc => true)
|
|
362
407
|
.catch(err => this.handleError(err));
|
|
@@ -370,8 +415,10 @@ class fhcRecipeApi {
|
|
|
370
415
|
* @param rid rid
|
|
371
416
|
* @param vision vision
|
|
372
417
|
* @param visionOthers visionOthers
|
|
418
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
419
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
373
420
|
*/
|
|
374
|
-
setVisionUsingPUT(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, rid, vision, visionOthers) {
|
|
421
|
+
setVisionUsingPUT(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, rid, vision, visionOthers, xFHCVendorName, xFHCPackageVersion) {
|
|
375
422
|
let _body = null;
|
|
376
423
|
const _url = this.host +
|
|
377
424
|
`/recipe/${encodeURIComponent(String(rid))}/vision` +
|
|
@@ -383,6 +430,9 @@ class fhcRecipeApi {
|
|
|
383
430
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
384
431
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
385
432
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
433
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
434
|
+
xFHCPackageVersion &&
|
|
435
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
386
436
|
return XHR_1.XHR.sendCommand("PUT", _url, headers, _body, this.fetchImpl)
|
|
387
437
|
.then(doc => new PutVisionResult_1.PutVisionResult(doc.body))
|
|
388
438
|
.catch(err => this.handleError(err));
|
|
@@ -399,8 +449,10 @@ class fhcRecipeApi {
|
|
|
399
449
|
* @param hcpQuality hcpQuality
|
|
400
450
|
* @param hcpSsin hcpSsin
|
|
401
451
|
* @param hcpName hcpName
|
|
452
|
+
* @param xFHCVendorName X-FHC-vendorName
|
|
453
|
+
* @param xFHCPackageVersion X-FHC-packageVersion
|
|
402
454
|
*/
|
|
403
|
-
updateFeedbackFlagUsingPUT(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, rid, feedbackFlag, hcpNihii, hcpQuality, hcpSsin, hcpName) {
|
|
455
|
+
updateFeedbackFlagUsingPUT(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, rid, feedbackFlag, hcpNihii, hcpQuality, hcpSsin, hcpName, xFHCVendorName, xFHCPackageVersion) {
|
|
404
456
|
let _body = null;
|
|
405
457
|
const _url = this.host +
|
|
406
458
|
`/recipe/${encodeURIComponent(String(rid))}/feedback/${encodeURIComponent(String(feedbackFlag))}` +
|
|
@@ -414,6 +466,9 @@ class fhcRecipeApi {
|
|
|
414
466
|
xFHCKeystoreId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-keystoreId", xFHCKeystoreId)));
|
|
415
467
|
xFHCTokenId && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-tokenId", xFHCTokenId)));
|
|
416
468
|
xFHCPassPhrase && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-passPhrase", xFHCPassPhrase)));
|
|
469
|
+
xFHCVendorName && (headers = headers.concat(new XHR_1.XHR.Header("X-FHC-vendorName", xFHCVendorName)));
|
|
470
|
+
xFHCPackageVersion &&
|
|
471
|
+
(headers = headers.concat(new XHR_1.XHR.Header("X-FHC-packageVersion", xFHCPackageVersion)));
|
|
417
472
|
return XHR_1.XHR.sendCommand("PUT", _url, headers, _body, this.fetchImpl)
|
|
418
473
|
.then(doc => new UpdateFeedbackFlagResult_1.UpdateFeedbackFlagResult(doc.body))
|
|
419
474
|
.catch(err => this.handleError(err));
|
package/model/InvoiceSender.d.ts
CHANGED
package/model/Medication.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export declare class Medication {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
export declare namespace Medication {
|
|
46
|
-
type InstructionsForReimbursementEnum = "PAYING_THIRD_PARTY" | "FIRST_DOSE" | "SECOND_DOSE" | "THIRD_DOSE" | "CHRONIC_KINDEY_DISEASE" | "DIABETES_TREATMENT" | "DIABETES_CONVENTION" | "NOT_REIMBURSABLE" | "EXPLAIN_MEDICATION";
|
|
46
|
+
type InstructionsForReimbursementEnum = "PAYING_THIRD_PARTY" | "FIRST_DOSE" | "SECOND_DOSE" | "THIRD_DOSE" | "CHRONIC_KINDEY_DISEASE" | "DIABETES_TREATMENT" | "DIABETES_CONVENTION" | "NOT_REIMBURSABLE" | "EXPLAIN_MEDICATION" | "DIABETES_STARTPATH";
|
|
47
47
|
const InstructionsForReimbursementEnum: {
|
|
48
48
|
PAYINGTHIRDPARTY: InstructionsForReimbursementEnum;
|
|
49
49
|
FIRSTDOSE: InstructionsForReimbursementEnum;
|
package/package.json
CHANGED
package/x-api/message-x-api.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class MessageXApi {
|
|
|
30
30
|
message: Message;
|
|
31
31
|
invoices: Array<Invoice>;
|
|
32
32
|
}>;
|
|
33
|
-
sendBatch(user: User, hcp: HealthcareParty, invoices: Array<InvoiceWithPatient>, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, efactApi: fhcEfactApi, fhcServer?: string | undefined, prefixer?: (fed: Insurance, hcpId: string) => Promise<string>, isConnectedAsPmg?: boolean, medicalLocationId?: string | null, speciality?: string): Promise<Message>;
|
|
33
|
+
sendBatch(user: User, hcp: HealthcareParty, invoices: Array<InvoiceWithPatient>, xFHCKeystoreId: string, xFHCTokenId: string, xFHCPassPhrase: string, efactApi: fhcEfactApi, fhcServer?: string | undefined, prefixer?: (fed: Insurance, hcpId: string) => Promise<string>, isConnectedAsPmg?: boolean, medicalLocationId?: string | null, speciality?: string, professionCode?: string): Promise<Message>;
|
|
34
34
|
saveMessageAttachment(user: User, msg: Message, res: EfactSendResponseWithError): Promise<Receipt>;
|
|
35
35
|
}
|
|
36
36
|
export {};
|
package/x-api/message-x-api.js
CHANGED
|
@@ -698,7 +698,7 @@ class MessageXApi {
|
|
|
698
698
|
}));
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
|
-
sendBatch(user, hcp, invoices, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, efactApi, fhcServer = undefined, prefixer, isConnectedAsPmg = false, medicalLocationId = null, speciality = "doctor") {
|
|
701
|
+
sendBatch(user, hcp, invoices, xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, efactApi, fhcServer = undefined, prefixer, isConnectedAsPmg = false, medicalLocationId = null, speciality = "doctor", professionCode = "10") {
|
|
702
702
|
const uuid = this.crypto.randomUuid();
|
|
703
703
|
const smallBase36 = (0, efact_util_1.uuidBase36Half)(uuid);
|
|
704
704
|
const fullBase36 = (0, efact_util_1.uuidBase36)(uuid);
|
|
@@ -711,16 +711,19 @@ class MessageXApi {
|
|
|
711
711
|
: Promise.resolve(`efact:${hcp.id}:${year}:${fed.code === "306" ? "300" : fed.code === "675" ? "600" : fed.code}:`)).then(prefix => {
|
|
712
712
|
return this.entityReferenceApi
|
|
713
713
|
.getLatest(prefix)
|
|
714
|
-
.then((er) =>
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}));
|
|
714
|
+
.then((er) => er && er.id && er.id.startsWith(prefix)
|
|
715
|
+
? (Number(er.id.split(":").pop()) || 0) + 1
|
|
716
|
+
: 1, (e) => {
|
|
717
|
+
if (e.statusCode === 404)
|
|
718
|
+
return 1;
|
|
719
|
+
else
|
|
720
|
+
throw e;
|
|
722
721
|
})
|
|
723
|
-
.then(
|
|
722
|
+
.then((nextSeqNumber) => this.entityReferenceApi.createEntityReference(new api_1.EntityReference({
|
|
723
|
+
id: prefix + _.padStart("" + (nextSeqNumber % 1000000000), 9, "0"),
|
|
724
|
+
docId: uuid
|
|
725
|
+
})))
|
|
726
|
+
.then(er => (0, efact_util_1.toInvoiceBatch)(invoices, hcp, fullBase36, er && er.id ? Number(er.id.substr(prefix.length)) % 1000 : 0, smallBase36, this.insuranceApi, this.invoiceXApi, this.api, speciality, professionCode))
|
|
724
727
|
.then(batch => efactApi
|
|
725
728
|
.sendBatchUsingPOST(xFHCKeystoreId, xFHCTokenId, xFHCPassPhrase, batch)
|
|
726
729
|
//.then(() => { throw "ERREUR FORCEE" })
|
|
@@ -16,7 +16,7 @@ export interface InvoiceWithPatient {
|
|
|
16
16
|
}
|
|
17
17
|
export declare function getFederaton(invoices: Array<InvoiceWithPatient>, insuranceApi: IccInsuranceApi): Promise<Insurance>;
|
|
18
18
|
export declare function getRelatedInvoicesInfo(invoicesWithPatient: InvoiceWithPatient[], insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi): Promise<RelatedInvoiceInfo[]>;
|
|
19
|
-
export declare function toInvoiceBatch(invoicesWithPatient: Array<InvoiceWithPatient>, hcp: HealthcareParty, batchRef: string, batchNumber: number, fileRef: string, insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi, speciality: string): Promise<InvoicesBatch>;
|
|
19
|
+
export declare function toInvoiceBatch(invoicesWithPatient: Array<InvoiceWithPatient>, hcp: HealthcareParty, batchRef: string, batchNumber: number, fileRef: string, insuranceApi: IccInsuranceApi, invoiceXApi: IccInvoiceXApi, messageXApi: IccMessageXApi, speciality: string, professionCode: string): Promise<InvoicesBatch>;
|
|
20
20
|
export declare function getDerogationMaxNumber(code: number): InvoiceItem.DerogationMaxNumberEnum;
|
|
21
21
|
export declare function toDerogationMaxNumber(derogation: InvoiceItem.DerogationMaxNumberEnum): number;
|
|
22
22
|
export declare function uuidBase36(uuid: string): string;
|
|
@@ -91,7 +91,7 @@ function getRelatedInvoicesInfo(invoicesWithPatient, insuranceApi, invoiceXApi,
|
|
|
91
91
|
}
|
|
92
92
|
exports.getRelatedInvoicesInfo = getRelatedInvoicesInfo;
|
|
93
93
|
// Here we trust the invoices argument for grouping validity (month, year and patient)
|
|
94
|
-
function toInvoiceBatch(invoicesWithPatient, hcp, batchRef, batchNumber, fileRef, insuranceApi, invoiceXApi, messageXApi, speciality) {
|
|
94
|
+
function toInvoiceBatch(invoicesWithPatient, hcp, batchRef, batchNumber, fileRef, insuranceApi, invoiceXApi, messageXApi, speciality, professionCode) {
|
|
95
95
|
return insuranceApi
|
|
96
96
|
.getInsurances(new api_1.ListOfIds({
|
|
97
97
|
ids: _.compact(invoicesWithPatient.map(iwp => iwp.invoice.recipientId))
|
|
@@ -157,7 +157,7 @@ function toInvoiceBatch(invoicesWithPatient, hcp, batchRef, batchNumber, fileRef
|
|
|
157
157
|
invoicesBatch.ioFederationCode = fedCodes[0];
|
|
158
158
|
invoicesBatch.numericalRef =
|
|
159
159
|
moment().get("year") * 1000000 + Number(fedCodes[0]) * 1000 + batchNumber;
|
|
160
|
-
invoicesBatch.sender = (0, fhc_invoice_sender_util_1.toInvoiceSender)(hcp, fedCodes[0]);
|
|
160
|
+
invoicesBatch.sender = (0, fhc_invoice_sender_util_1.toInvoiceSender)(hcp, fedCodes[0], professionCode);
|
|
161
161
|
invoicesBatch.uniqueSendNumber = batchNumber;
|
|
162
162
|
return invoicesBatch;
|
|
163
163
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HealthcareParty } from "@icure/api";
|
|
2
2
|
import { InvoiceSender } from "../../model/models";
|
|
3
|
-
export declare function toInvoiceSender(hcp: HealthcareParty, fedCode: string): InvoiceSender;
|
|
3
|
+
export declare function toInvoiceSender(hcp: HealthcareParty, fedCode: string, professionCode?: string): InvoiceSender;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toInvoiceSender = void 0;
|
|
4
4
|
const hcp_util_1 = require("./hcp-util");
|
|
5
|
-
function toInvoiceSender(hcp, fedCode) {
|
|
5
|
+
function toInvoiceSender(hcp, fedCode, professionCode = "10") {
|
|
6
6
|
const phoneNumber = (0, hcp_util_1.getPhoneNumber)(hcp, 10) || 484082978;
|
|
7
7
|
if (!phoneNumber) {
|
|
8
8
|
throw new Error("NO_PHONE_NUMBER_IN_HCP");
|
|
@@ -24,7 +24,8 @@ function toInvoiceSender(hcp, fedCode) {
|
|
|
24
24
|
lastName: hcp.lastName,
|
|
25
25
|
nihii: Number(hcp.nihii),
|
|
26
26
|
phoneNumber: phoneNumber,
|
|
27
|
-
ssin: hcp.ssin
|
|
27
|
+
ssin: hcp.ssin,
|
|
28
|
+
professionCode: professionCode ? parseInt(professionCode) : undefined
|
|
28
29
|
};
|
|
29
30
|
return invoiceSender;
|
|
30
31
|
}
|