Last modified by Nico Lemaire on 2025/05/06 15:49

From version 1.4
edited by Robin Huisman
on 2022/02/08 11:45
Change comment: There is no comment for this version
To version 4.1
edited by Robin Huisman
on 2024/03/28 15:25
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,47 +1,51 @@
1 1  {{toc/}}
2 2  
3 3  
4 -= Firewall IP-Adresssen van TerraIndex =
4 +(% element-id="1884" %)
5 += (% element-id="1883" %)Firewall IP-Addresses of TerraIndex(%%) =
5 5  
6 -Onze IP-adressen:
7 +(% element-id="1882" %)
8 +Oud IP-addresses:
7 7  
8 -ingaand [[Web.terraindex.com>>url:http://Web.terraindex.com]]
10 +(% element-id="1881" %)
11 +inbound [[Web.terraindex.com>>url:http://Web.terraindex.com||element-id="1880"]]
9 9  137.116.199.164
10 10  
11 -ingaand [[Test.terraindex.com>>url:http://Test.terraindex.com]]
14 +(% element-id="1878" %)
15 +outbound [[Test.terraindex.com>>url:http://Test.terraindex.com||element-id="1877"]]
12 12  104.45.9.128
13 13  
14 -Productie uitgaand
18 +(% element-id="1875" %)
19 +Production outbound
15 15  40.115.34.64
16 16  
17 -Test uitgaand
22 +(% element-id="1873" %)
23 +Test outbound
18 18  13.73.138.173
19 19  
20 -CD/CI uitgaand
26 +(% element-id="1871" %)
27 +CD/CI outbound
21 21  40.114.238.16
22 22  
23 ---Kantoor VPN uitgaand  (niet meer in gebruik, was de oude OpenVPN)
24 -10.33.66.215--
25 -
26 -Kantoor uitgaand
30 +(% element-id="1869" %)
31 +Office outbound
27 27  213.124.115.132
28 28  
29 ---Oude Citrix uitgaand (citrix is ook verhuisd, dit is niet meer in gebruik)
30 -83.96.194.140--
31 31  
35 +(% element-id="1864" %)
36 += (% element-id="1863" %)Labdelivery (menu-card) files Exchange(%%) =
32 32  
33 -= Labaanlever bestanden uitwisseling =
38 +(% element-id="1862" %)
39 +== (% element-id="1861" %)Solution/Design(%%) ==
34 34  
35 -== Oplossing/Design ==
36 36  
37 -
38 -(% class="table-hover" %)
39 -|**Action**|**TerraIndex**| |**Laboratorium**|**Parameters/Message**|**Remarks**|**ResultCodes**
40 -|1|Sends a request to the function: GetCustomers().|=>| |**WebserviceUsername (string), **
41 -**WebservicePassword (string),**
42 -**CustomerUsername (string)**| |
43 -|2| | |Receives the request and check the customers this username and searches the dateLastChanged for this Customer.| | |
44 -|3| |<=|Sends back the list of customers with the lastChangedTimestamp|ResultCode (),
42 +(% class="table-hover" element-id="1858" %)
43 +(% element-id="1856" %)|(% element-id="1855" %)(% element-id="1854" %)**Action**|(% element-id="1853" %)(% element-id="1852" %)**TerraIndex**|(% element-id="1851" %) |(% element-id="1849" %)(% element-id="1848" %)**Laboratorium**|(% element-id="1847" %)(% element-id="1846" %)**Parameters/Message**|(% element-id="1845" %)(% element-id="1844" %)**Remarks**|(% element-id="1843" %)(% element-id="1842" %)**ResultCodes**
44 +(% element-id="1841" %)|(% element-id="1840" %)1|(% element-id="1839" %)Sends a request to the function: GetCustomers().|=(% element-id="1838" %)>|(% element-id="1837" %) |(% element-id="1835" %)(% element-id="1834" %)**WebserviceUsername (string), **(%%)
45 +(% element-id="1832" %)**WebservicePassword (string),**(%%)
46 +(% element-id="1830" %)**CustomerUsername (string)**|(% element-id="1829" %) |(% element-id="1827" %)
47 +(% element-id="1825" %)|(% element-id="1824" %)2|(% element-id="1823" %) |(% element-id="1821" %) |(% element-id="1819" %)Receives the request and check the customers this username and searches the dateLastChanged for this Customer.|(% element-id="1818" %) |(% element-id="1816" %) |(% element-id="1814" %)
48 +(% element-id="1812" %)|(% element-id="1811" %)3|(% element-id="1810" %) |(% element-id="1808" %)<=|(% element-id="1807" %)Sends back the list of customers with the lastChangedTimestamp|(% element-id="1806" %)ResultCode (),
45 45  ErrorMessage (string),
46 46  List<customer> , Customer:
47 47  CustomerCode (string),
... ... @@ -48,7 +48,7 @@
48 48  CustomerName (string),
49 49  LabID (int),
50 50  LabName (string),
51 -ChangedTimeStamp (DateTime)|We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|1 = Success,
55 +ChangedTimeStamp (DateTime)|(% element-id="1798" %)We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|(% element-id="1797" %)1 = Success,
52 52  2 = GeneralError,
53 53  3 = WrongSIKBVersion,
54 54  4 = InvalidCredentials,
... ... @@ -58,26 +58,29 @@
58 58  8 = InvalidOrderId,
59 59  9 = OrderIdAlreadyApproved
60 60  10 = PDFNotAvailable
61 -|4|Receives the list of Customers, and will check for each customer it needs to request a new/changed labdelivery file based on the ChangedTimestamp.| | | |If a customer is not longer in this list, TerraIndex can remove this customercode from the customer database.|
62 -|5|Sends a request to the function: GetProductList() if it has changed.|=>| |**WebserviceUsername (string), **
63 -**WebservicePassword (string),**
64 -**CustomerUsername (string),**
65 +(% element-id="1787" %)|(% element-id="1786" %)4|(% element-id="1785" %)Receives the list of Customers, and will check for each customer it needs to request a new/changed labdelivery file based on the ChangedTimestamp.|(% element-id="1784" %) |(% element-id="1782" %) |(% element-id="1780" %) |(% element-id="1778" %)If a customer is not longer in this list, TerraIndex can remove this customercode from the customer database.|(% element-id="1777" %)
66 +(% element-id="1775" %)|(% element-id="1774" %)5|(% element-id="1773" %)Sends a request to the function: GetProductList() if it has changed.|=(% element-id="1772" %)>|(% element-id="1771" %) |(% element-id="1769" %)(% element-id="1768" %)**WebserviceUsername (string), **(%%)
67 +(% element-id="1766" %)**WebservicePassword (string),**(%%)
68 +(% element-id="1764" %)**CustomerUsername (string),**(%%)
65 65  LabID (int),
66 66  CustomerCode (string),
67 67  LanguageCode (string, default 'nld' volgens ISO 639-3-codes),
68 68  SIKBVersion (string, default: '13.4.0'),
69 -UseZipStream/UseZip (bool, default: 'false')|(((
73 +UseZipStream/UseZip (bool, default: 'false')|(% element-id="1758" %)(% element-id="1757" %)
74 +(((
75 +(% element-id="1756" %)
70 70  We start with dutch, then extend with multiple languages, TerraIndex is in the lead to request multiple languages.
71 71  TerraIndex uses: 'fra', 'nld', 'eng', 'spa', 'deu', 'ita', 'por', 'dan'
72 72  
73 73  
80 +(% element-id="1752" %)
74 74  Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc.
75 -)))|
76 -|6| | |Reveives a request to create a labdelivery file in a certain version of SIKB. It will generate the file.| | |
77 -|7| |<=|Sends back the SIKB file, as a Base64 encoded string, with or without using a zipstream.|ResultCode (),
82 +)))|(% element-id="1751" %)
83 +(% element-id="1749" %)|(% element-id="1748" %)6|(% element-id="1747" %) |(% element-id="1745" %) |(% element-id="1743" %)Reveives a request to create a labdelivery file in a certain version of SIKB. It will generate the file.|(% element-id="1742" %) |(% element-id="1740" %) |(% element-id="1738" %)
84 +(% element-id="1736" %)|(% element-id="1735" %)7|(% element-id="1734" %) |(% element-id="1732" %)<=|(% element-id="1731" %)Sends back the SIKB file, as a Base64 encoded string, with or without using a zipstream.|(% element-id="1730" %)ResultCode (),
78 78  ErrorMessage (string),
79 79  FileContent_Base64 (string),
80 -UseZipStream/UseZip (bool, default: 'false')| |1 = Success,
87 +UseZipStream/UseZip (bool, default: 'false')|(% element-id="1726" %) |(% element-id="1724" %)1 = Success,
81 81  2 = GeneralError,
82 82  3 = WrongSIKBVersion,
83 83  4 = InvalidCredentials,
... ... @@ -87,15 +87,19 @@
87 87  8 = InvalidOrderId,
88 88  9 = OrderIdAlreadyApproved
89 89  10 = PDFNotAvailable
90 -|8|Receives the DeliveryFile and saves the file for import into customer database.| | | | |
91 -|9|Go back to step 5, for every Customer code, every language.| | | | |
92 -|10|Process the LabDeliveryFiles| | | | |
97 +(% element-id="1714" %)|(% element-id="1713" %)8|(% element-id="1712" %)Receives the DeliveryFile and saves the file for import into customer database.|(% element-id="1711" %) |(% element-id="1709" %) |(% element-id="1707" %) |(% element-id="1705" %) |(% element-id="1703" %)
98 +(% element-id="1701" %)|(% element-id="1700" %)9|(% element-id="1699" %)Go back to step 5, for every Customer code, every language.|(% element-id="1698" %) |(% element-id="1696" %) |(% element-id="1694" %) |(% element-id="1692" %) |(% element-id="1690" %)
99 +(% element-id="1688" %)|(% element-id="1687" %)10|(% element-id="1686" %)Process the LabDeliveryFiles|(% element-id="1685" %) |(% element-id="1683" %) |(% element-id="1681" %) |(% element-id="1679" %) |(% element-id="1677" %)
93 93  
94 -== Get Customers (POST) ==
101 +(% element-id="1675" %)
102 +== (% element-id="1674" %)Get Customers (POST)(%%) ==
95 95  
96 -=== Request example ===
104 +(% element-id="1673" %)
105 +=== (% element-id="1672" %)Request example(%%) ===
97 97  
98 -|(((
107 +(% element-id="1671" %)
108 +(% element-id="1669" %)|(% element-id="1668" %)(% element-id="1667" %)
109 +(((
99 99  {{code language="C#"}}
100 100  public GetCustomersCall.Response GetCustomers(string WebserviceUsername, string WebservicePassword, string CustomerUsername)
101 101          {
... ... @@ -140,235 +140,324 @@
140 140          }
141 141  {{/code}}
142 142  
154 +(% element-id="1566" %)
143 143  
144 144  )))
145 145  
146 -|(((
158 +(% element-id="1564" %)
159 +(% element-id="1562" %)|(% element-id="1561" %)(% element-id="1560" %)
160 +(((
161 +(% element-id="1559" %)
147 147  POST https:~/~/<URL>/GetCustomers HTTP/1.1
148 148  
164 +(% element-id="1558" %)
149 149  Content-Type: application/x-www-form-urlencoded
150 150  
167 +(% element-id="1557" %)
151 151  Host: 81.175.89.24
152 152  
170 +(% element-id="1556" %)
153 153  Content-Length: 115
154 154  
173 +(% element-id="1555" %)
155 155  Expect: 100-continue
156 156  
157 157  
177 +(% element-id="1552" %)
158 158  userName=<webservice_username>&password=<Webservice_password>&customerUsername=<customer_username or token>
159 159  )))
160 160  
161 -=== Response example ===
181 +(% element-id="1551" %)
182 +=== (% element-id="1550" %)Response example(%%) ===
162 162  
163 -|(((
184 +(% element-id="1549" %)
185 +(% element-id="1547" %)|(% element-id="1546" %)(% element-id="1545" %)
186 +(((
187 +{{code language="XML"}}
164 164  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
165 -
166 166  <Response><Customers>
167 -
168 - <Customer LabId="1" LabName="Example Laboratorium" CustomerId="300" CustomerName="Adviesbureau De bodemkoning - Rotterdam" LastModifiedOnClient="2019-05-08T11:05:14.17+02:00" />
169 -
170 - <Customer LabId="1" LabName="Example Laboratorium" CustomerId="656" CustomerName="Adviesbureau De bodemkoning - Delft" LastModifiedOnClient="2019-04-19T13:20:10.123+02:00" />
171 -
190 +  <Customer LabId="1" LabName="Example Laboratorium" CustomerId="300" CustomerName="Adviesbureau De bodemkoning - Rotterdam" LastModifiedOnClient="2019-05-08T11:05:14.17+02:00" ></Customer>
191 +  <Customer LabId="1" LabName="Example Laboratorium" CustomerId="656" CustomerName="Adviesbureau De bodemkoning - Delft" LastModifiedOnClient="2019-04-19T13:20:10.123+02:00" ></Customer>
172 172  </Customers>
173 -
174 174  <Status>
175 -
176 - <StatusCode>1</StatusCode>
177 -
178 - <StatusCodeDescription>OK</StatusCodeDescription>
179 -
180 - <ErrorMessage></ErrorMessage>
181 -
194 +    <StatusCode>1</StatusCode>
195 +    <StatusCodeDescription>OK</StatusCodeDescription>
196 +    <ErrorMessage></ErrorMessage>
182 182  </Status>
183 -
184 184  </Response>
199 +{{/code}}
200 +
201 +(% element-id="1492" %)
202 +
185 185  )))
186 186  
187 -== Get Products (POST) ==
205 +(% element-id="1490" %)
206 +== (% element-id="1489" %)Get Products (POST)(%%) ==
188 188  
189 -=== Request example ===
208 +(% element-id="1488" %)
209 +=== (% element-id="1487" %)Request example(%%) ===
190 190  
191 -|(((
211 +(% element-id="1486" %)
212 +(% element-id="1484" %)|(% element-id="1483" %)(% element-id="1482" %)
213 +(((
214 +(% element-id="1481" %)
192 192  public GetProductsCall.Response GetProductList(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, int labid, string sikbVersion, string languageCode)
193 193  
217 +(% element-id="1480" %)
194 194   {
195 195  
196 196  
221 +(% element-id="1477" %)
197 197   GetProductsCall.Response set = new GetProductsCall.Response();
198 198  
199 199  
225 +(% element-id="1474" %)
200 200   try
201 201  
228 +(% element-id="1473" %)
202 202   {
203 203  
231 +(% element-id="1472" %)
204 204   bool useZipstream = true;
205 205  
234 +(% element-id="1471" %)
206 206   var content = new FormUrlEncodedContent(new[]
207 207  
237 +(% element-id="1470" %)
208 208   {
209 209  
240 +(% element-id="1469" %)
210 210   new KeyValuePair<string, string>("userName", WebserviceUsername),
211 211  
243 +(% element-id="1468" %)
212 212   new KeyValuePair<string, string>("password", WebservicePassword),
213 213  
246 +(% element-id="1467" %)
214 214   new KeyValuePair<string, string>("customerUsername", CustomerUsername),
215 215  
249 +(% element-id="1466" %)
216 216   new KeyValuePair<string, string>("languageCode", languageCode),
217 217  
252 +(% element-id="1465" %)
218 218   new KeyValuePair<string, string>("clientId", customerid),
219 219  
255 +(% element-id="1464" %)
220 220   new KeyValuePair<string, string>("sikbVersion", sikbVersion),
221 221  
258 +(% element-id="1463" %)
222 222   new KeyValuePair<string, string>("useZip", useZipstream.ToString() ),
223 223  
261 +(% element-id="1462" %)
224 224   });
225 225  
226 226  
265 +(% element-id="1459" %)
227 227   HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetProducts", content).Result;
228 228  
268 +(% element-id="1458" %)
229 229   response.EnsureSuccessStatusCode();
230 230  
271 +(% element-id="1457" %)
231 231   string responseMessage = response.Content.ReadAsStringAsync().Result;
232 232  
233 233  
275 +(% element-id="1454" %)
234 234   if (string.IsNullOrEmpty(responseMessage))
235 235  
278 +(% element-id="1453" %)
236 236   {
237 237  
281 +(% element-id="1452" %)
238 238   throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /GetProducts" + "]");
239 239  
284 +(% element-id="1451" %)
240 240   }
241 241  
287 +(% element-id="1450" %)
242 242   using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~)
243 243  
290 +(% element-id="1449" %)
244 244   {
245 245  
293 +(% element-id="1448" %)
246 246   XmlSerializer serializer = new XmlSerializer(typeof(GetProductsCall.Response));
247 247  
296 +(% element-id="1447" %)
248 248   set = (GetProductsCall.Response)serializer.Deserialize(ms);
249 249  
299 +(% element-id="1446" %)
250 250   }
251 251  
252 252  
303 +(% element-id="1443" %)
253 253   if (useZipstream && !string.IsNullOrEmpty(set.FileContent))
254 254  
306 +(% element-id="1442" %)
255 255   {
256 256  
309 +(% element-id="1441" %)
257 257   ~/~/convert from base64 string back to normal
258 258  
312 +(% element-id="1440" %)
259 259   ~/~/first check for real Base64, by checking there is no 'xml'  in it
260 260  
315 +(% element-id="1439" %)
261 261   if (!set.FileContent.Contains("<labaanlevering"))
262 262  
318 +(% element-id="1438" %)
263 263   {
264 264  
321 +(% element-id="1437" %)
265 265   set.FileContent = ZipStreamHelper.DecompressBase64StringToString(set.FileContent);
266 266  
324 +(% element-id="1436" %)
267 267   }
268 268  
327 +(% element-id="1435" %)
269 269   }
270 270  
271 271  
331 +(% element-id="1432" %)
272 272   }
273 273  
334 +(% element-id="1431" %)
274 274   catch (Exception ex)
275 275  
337 +(% element-id="1430" %)
276 276   {
277 277  
340 +(% element-id="1429" %)
278 278   #region handle exception
279 279  
280 280  
344 +(% element-id="1426" %)
281 281   set.Status = new BusinessEntities.LabRestService.GetProductsCall.ResponseStatus();
282 282  
347 +(% element-id="1425" %)
283 283   set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString();
284 284  
350 +(% element-id="1424" %)
285 285   set.Status.ErrorMessage = "Exception occurred in GetProducts (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.Message;
286 286  
287 287  
354 +(% element-id="1421" %)
288 288   ex.Data.Add("WebserviceUsername", WebserviceUsername);
289 289  
357 +(% element-id="1420" %)
290 290   ex.Data.Add("WebservicePassword", WebservicePassword);
291 291  
360 +(% element-id="1419" %)
292 292   ex.Data.Add("CustomerUsername", CustomerUsername);
293 293  
363 +(% element-id="1418" %)
294 294   ex.Data.Add("sikbVersion", sikbVersion);
295 295  
366 +(% element-id="1417" %)
296 296   ex.Data.Add("customerid", customerid);
297 297  
369 +(% element-id="1416" %)
298 298   ex.Data.Add("languageCode", languageCode);
299 299  
300 300  
373 +(% element-id="1413" %)
301 301   ExceptionHandler.HandleException(ex);
302 302  
376 +(% element-id="1412" %)
303 303   #endregion
304 304  
379 +(% element-id="1411" %)
305 305   }
306 306  
307 307  
383 +(% element-id="1408" %)
308 308   return set;
309 309  
386 +(% element-id="1407" %)
310 310   }
311 311  )))
312 312  
313 -|(((
390 +(% element-id="1406" %)
391 +(% element-id="1404" %)|(% element-id="1403" %)(% element-id="1402" %)
392 +(((
393 +(% element-id="1401" %)
314 314  POST https:~/~/<URL>/GetProducts HTTP/1.1
315 315  
396 +(% element-id="1400" %)
316 316  Content-Type: application/x-www-form-urlencoded
317 317  
399 +(% element-id="1399" %)
318 318  Host: 81.175.89.24
319 319  
402 +(% element-id="1398" %)
320 320  Content-Length: 179
321 321  
405 +(% element-id="1397" %)
322 322  Expect: 100-continue
323 323  
324 324  
409 +(% element-id="1394" %)
325 325  userName=<webservice_username>&password=<Webservice_password>&customerUsername=<customer_username or token>&languageCode=nld&clientId=300&sikbVersion=13.5.0&useZip=True
326 326  )))
327 327  
328 -=== Response example ===
413 +(% element-id="1393" %)
414 +=== (% element-id="1392" %)Response example(%%) ===
329 329  
330 -|(((
416 +(% element-id="1391" %)
417 +(% element-id="1389" %)|(% element-id="1388" %)(% element-id="1387" %)
418 +(((
419 +(% element-id="1386" %)
331 331  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
332 332  
422 +(% element-id="1385" %)
333 333  <Response>
334 334  
425 +(% element-id="1384" %)
335 335  <FileContent> {SIKB FILE in ZIPSTREAM BASE64 format}</FileContent>
336 336  
428 +(% element-id="1383" %)
337 337  <Status>
338 338  
431 +(% element-id="1382" %)
339 339  <StatusCode>1</StatusCode>
340 340  
434 +(% element-id="1381" %)
341 341  <StatusCodeDescription>OK</StatusCodeDescription>
342 342  
437 +(% element-id="1380" %)
343 343  <ErrorMessage></ErrorMessage>
344 344  
440 +(% element-id="1379" %)
345 345  </Status></Response>
346 346  )))
347 347  
444 +(% element-id="1378" %)
445 += (% element-id="1377" %)
446 +Useraccount Checkup.(%%) =
348 348  
349 -= Gebruikersaccount controleren. =
448 +(% element-id="1374" %)
449 +== (% element-id="1373" %)Solution/Design(%%) ==
350 350  
451 +(% element-id="1372" %)
452 +With every call we will no longer send customer usernames and customer passwords. We want to use a fixed Machine 2 Machine username and password for TerraIndex. So we need to be able to quickly check whether the Customer username we want to use exists, and is bound to our TerraIndex fixed Machine 2 machine account.
351 351  
352 -== Oplossing/Design ==
353 -
354 -Bij iedere call gaan we geen username van de klanten meer sturen met een vast webservice username en password voor TerraIndex. Hier willen we ook snel op kunnen controleren of deze wel bestaat.
355 -
454 +(% element-id="1371" %)
356 356  WebserviceUsername (string),
357 357  WebservicePassword (string),
358 358  CustomerUsername (string)
359 359  
360 360  
361 -Hiervoor maken we een Webserice voor ValidCredentials Check:
460 +(% element-id="1366" %)
461 +Therefor we call a Webserice for ValidCredentials Check:
362 362  
363 363  
364 -(% class="table-hover" %)
365 -|**Action**|**TerraIndex**| |**Laboratorium**|**Parameters/Message**|**Remarks**|**ResultCodes**
366 -|1|Sends a request to the function: ValidCredentials().|=>| |WebserviceUsername (string),
464 +(% class="table-hover" element-id="1363" %)
465 +(% element-id="1361" %)|(% element-id="1360" %)(% element-id="1359" %)**Action**|(% element-id="1358" %)(% element-id="1357" %)**TerraIndex**|(% element-id="1356" %) |(% element-id="1354" %)(% element-id="1353" %)**Laboratorium**|(% element-id="1352" %)(% element-id="1351" %)**Parameters/Message**|(% element-id="1350" %)(% element-id="1349" %)**Remarks**|(% element-id="1348" %)(% element-id="1347" %)**ResultCodes**
466 +(% element-id="1346" %)|(% element-id="1345" %)1|(% element-id="1344" %)Sends a request to the function: ValidCredentials().|=(% element-id="1343" %)>|(% element-id="1342" %) |(% element-id="1340" %)WebserviceUsername (string),
367 367  WebservicePassword (string),
368 -CustomerUsername (string)|We want to skip the Password of the customer, and we use the WebserviceUsername + WebservicePassword for real authentication.|
369 -|2| | |Receives the request and checks the combination of WebserviceUsername and WebservicePassword is Ok. Then checks the CustomerUsername is valid.| | |
370 -|3| |<=|Sends back a Success of InvalidCredentials|ResultCode (),
371 -ErrorMessage (string),| |1 = Success,
468 +CustomerUsername (string)|(% element-id="1337" %)We want to skip the Password of the customer, and we use the WebserviceUsername + WebservicePassword for real authentication.|(% element-id="1336" %)
469 +(% element-id="1334" %)|(% element-id="1333" %)2|(% element-id="1332" %) |(% element-id="1330" %) |(% element-id="1328" %)Receives the request and checks the combination of WebserviceUsername and WebservicePassword is Ok. Then checks the CustomerUsername is valid.|(% element-id="1327" %) |(% element-id="1325" %) |(% element-id="1323" %)
470 +(% element-id="1321" %)|(% element-id="1320" %)3|(% element-id="1319" %) |(% element-id="1317" %)<=|(% element-id="1316" %)Sends back a Success of InvalidCredentials|(% element-id="1315" %)ResultCode (),
471 +ErrorMessage (string),|(% element-id="1313" %) |(% element-id="1311" %)1 = Success,
372 372  2 = GeneralError,
373 373  3 = WrongSIKBVersion,
374 374  4 = InvalidCredentials,
... ... @@ -379,149 +379,215 @@
379 379  9 = OrderIdAlreadyApproved
380 380  10 = PDFNotAvailable
381 381  
382 -== Check ValidCredentials (POST) ==
482 +(% element-id="1301" %)
483 +== (% element-id="1300" %)Check ValidCredentials (POST)(%%) ==
383 383  
384 -=== Request example ===
485 +(% element-id="1299" %)
486 +=== (% element-id="1298" %)Request example(%%) ===
385 385  
386 -|(((
488 +(% element-id="1297" %)
489 +(% element-id="1295" %)|(% element-id="1294" %)(% element-id="1293" %)
490 +(((
491 +(% element-id="1292" %)
387 387  public ValidCredentialsCall.Response ValidCredentials(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid)
388 388  
494 +(% element-id="1291" %)
389 389   {
390 390  
497 +(% element-id="1290" %)
391 391   ValidCredentialsCall.Response set = new ValidCredentialsCall.Response();
392 392  
393 393  
501 +(% element-id="1287" %)
394 394   try
395 395  
504 +(% element-id="1286" %)
396 396   {
397 397  
398 398  
508 +(% element-id="1283" %)
399 399   var content = new FormUrlEncodedContent(new[]
400 400  
511 +(% element-id="1282" %)
401 401   {
402 402  
514 +(% element-id="1281" %)
403 403   new KeyValuePair<string, string>("userName", WebserviceUsername),
404 404  
517 +(% element-id="1280" %)
405 405   new KeyValuePair<string, string>("password", WebservicePassword),
406 406  
520 +(% element-id="1279" %)
407 407   ~/~/new KeyValuePair<string, string>("clientId", customerid),   ~/~/ Optional
408 408  
523 +(% element-id="1278" %)
409 409   new KeyValuePair<string, string>("customerUsername", CustomerUsername),
410 410  
526 +(% element-id="1277" %)
411 411   });
412 412  
413 413  
530 +(% element-id="1274" %)
414 414   HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/ValidCredentials", content).Result;
415 415  
533 +(% element-id="1273" %)
416 416   response.EnsureSuccessStatusCode();
417 417  
536 +(% element-id="1272" %)
418 418   string responseMessage = response.Content.ReadAsStringAsync().Result;
419 419  
420 420  
540 +(% element-id="1269" %)
421 421   if (string.IsNullOrEmpty(responseMessage))
422 422  
543 +(% element-id="1268" %)
423 423   {
424 424  
546 +(% element-id="1267" %)
425 425   throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " / ValidCredentials" + "]");
426 426  
549 +(% element-id="1266" %)
427 427   }
428 428  
552 +(% element-id="1265" %)
429 429   using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~)
430 430  
555 +(% element-id="1264" %)
431 431   {
432 432  
558 +(% element-id="1263" %)
433 433   XmlSerializer serializer = new XmlSerializer(typeof(ValidCredentialsCall.Response));
434 434  
561 +(% element-id="1262" %)
435 435   set = (ValidCredentialsCall.Response)serializer.Deserialize(ms);
436 436  
437 437  
565 +(% element-id="1259" %)
438 438   return set;
439 439  
568 +(% element-id="1258" %)
440 440   }
441 441  
442 442  
572 +(% element-id="1255" %)
443 443   }
444 444  
575 +(% element-id="1254" %)
445 445   catch (Exception ex)
446 446  
578 +(% element-id="1253" %)
447 447   {
448 448  
581 +(% element-id="1252" %)
449 449   #region handle exception
450 450  
451 451  
585 +(% element-id="1249" %)
452 452   set.Status = new BusinessEntities.LabRestService.ValidCredentialsCall.ResponseStatus();
453 453  
588 +(% element-id="1248" %)
454 454   set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString();
455 455  
591 +(% element-id="1247" %)
456 456   set.Status.ErrorMessage = "Exception occurred in GetValidCredentials (username: " + WebserviceUsername + ", with message: " + ex.Message;
457 457  
458 458  
595 +(% element-id="1244" %)
459 459   ex.Data.Add("WebserviceUsername", WebserviceUsername);
460 460  
598 +(% element-id="1243" %)
461 461   ex.Data.Add("WebservicePassword", WebservicePassword);
462 462  
601 +(% element-id="1242" %)
463 463   ex.Data.Add("CustomerUsername", CustomerUsername);
464 464  
465 465  
605 +(% element-id="1239" %)
466 466   ExceptionHandler.HandleException(ex);
467 467  
608 +(% element-id="1238" %)
468 468   #endregion
469 469  
611 +(% element-id="1237" %)
470 470   }
471 471  
472 472  
615 +(% element-id="1234" %)
473 473   return set;
474 474  
618 +(% element-id="1233" %)
475 475   }
476 476  )))
477 477  
478 -|(((
622 +(% element-id="1232" %)
623 +(% element-id="1230" %)|(% element-id="1229" %)(% element-id="1228" %)
624 +(((
625 +(% element-id="1227" %)
479 479  POST https:~/~/<URL>/ValidCredentials HTTP/1.1
480 480  
628 +(% element-id="1226" %)
481 481  Content-Type: application/x-www-form-urlencoded
482 482  
631 +(% element-id="1225" %)
483 483  Host: 81.175.89.24
484 484  
634 +(% element-id="1224" %)
485 485  Content-Length: 125
486 486  
637 +(% element-id="1223" %)
487 487  Expect: 100-continue
488 488  
489 489  
641 +(% element-id="1220" %)
490 490  userName=<webservice_username>&password=<Webservice_password>&clientId=<optional otherwise empty>&customerUsername=<customer_username or token>
491 491  )))
492 492  
493 -=== Response example ===
645 +(% element-id="1219" %)
646 +=== (% element-id="1218" %)Response example(%%) ===
494 494  
495 -|(((
648 +(% element-id="1217" %)
649 +(% element-id="1215" %)|(% element-id="1214" %)(% element-id="1213" %)
650 +(((
651 +(% element-id="1212" %)
496 496  <?xml version="1.0" encoding="UTF-8" standalone="no"?><Response>
497 497  
654 +(% element-id="1211" %)
498 498  <Status>
499 499  
657 +(% element-id="1210" %)
500 500  <StatusCode>1</StatusCode>
501 501  
660 +(% element-id="1209" %)
502 502  <StatusCodeDescription>OK</StatusCodeDescription>
503 503  
663 +(% element-id="1208" %)
504 504  <ErrorMessage></ErrorMessage>
505 505  
666 +(% element-id="1207" %)
506 506  </Status>
507 507  
669 +(% element-id="1206" %)
508 508  </Response>
509 509  )))
510 510  
511 -= Opdrachten versturen (POST) =
673 +(% element-id="1205" %)
674 += (% element-id="1204" %)Labassignment request delivery(POST)(%%) =
512 512  
513 -== Oplossing/Design ==
676 +(% element-id="1203" %)
677 +== (% element-id="1202" %)Solution/Design(%%) ==
514 514  
515 -Hiervoor maken we een Webserice voor CreateOrder om de opdracht aan te maken.
516 -Na de create willen we in de toekomst een overzicht van het laboratorium in bijv. PDF tonen, waarbij de gebruiker de prijzen ziet en kan bevestigen of annuleren.
517 -Afhankelijk van de keuze van de gebruiker bij het laboratorium, roept TerraIndex de ApproveOrder of de CancelOrder aan.
679 +(% element-id="1201" %)
680 +For this we create a Webserice for CreateOrder to create the order in the lab system.
681 +After the creation, we would like to show an order overview of the laboratory in the future in PDF. The user can see the prices and can confirm or cancel.
682 +Depending on the user's choice at the laboratory, to support this or not, TerraIndex calls the ApproveOrder or the CancelOrder.
518 518  
519 -Voor nu gaan we er vanuit dat wij dit niet kunnen, en stuurt TerraIndex needsApprovalIsSupported = false mee. Mocht dit True worden in de toekomst, dan kan het Lab bij het result aangeven of het wel of niet nodig is, in het NeedsApprove veld.
684 +(% element-id="0" %)
685 +For default we assume that we cannot do this yet, and TerraIndex sends needsApprovalIsSupported = false. If this becomes true in the future, the Lab can indicate whether or not it is necessary in the NeedsApprove field.
520 520  
521 521  
522 -(% class="table-hover" %)
523 -|**Action**|**TerraIndex**| |**Laboratorium**|**Parameters/Message**|**Remarks**|**ResultCodes**
524 -|1|Sends a request to the function: CreateOrder().|=>| |WebserviceUsername (string),
688 +(% class="table-hover" element-id="1195" %)
689 +(% element-id="1193" %)|(% element-id="1192" %)(% element-id="1191" %)**Action**|(% element-id="1190" %)(% element-id="1189" %)**TerraIndex**|(% element-id="1188" %) |(% element-id="1186" %)(% element-id="1185" %)**Laboratorium**|(% element-id="1184" %)(% element-id="1183" %)**Parameters/Message**|(% element-id="1182" %)(% element-id="1181" %)**Remarks**|(% element-id="1180" %)(% element-id="1179" %)**ResultCodes**
690 +(% element-id="1178" %)|(% element-id="1177" %)1|(% element-id="1176" %)Sends a request to the function: CreateOrder().|=(% element-id="1175" %)>|(% element-id="1174" %) |(% element-id="1172" %)WebserviceUsername (string),
525 525  WebservicePassword (string),
526 526  CustomerUsername (string),
527 527  FileContent_Base64 (string),
... ... @@ -528,22 +528,22 @@
528 528  UseZipStream/UseZip (bool, default: 'false'),
529 529  CustomerCode (string),
530 530  SIKBVersion (string, default: '13.4.0'),
531 -needsApprovalIsSupported (bool)|SIKB Version included, so labs can quickly check the version.
697 +needsApprovalIsSupported (bool)|(% element-id="1164" %)SIKB Version included, so labs can quickly check the version.
532 532  Besides SIKB 13.4.0, TerraIndex also supports 9.0.0.
533 533  \\Before sending the SIKB, validate to the XSD!
534 534  And to the XSLT?
535 535  \\needsApprovalIsSupported = false; means we dont get PDF with offerte. This will make is faster.
536 -needsApprovalIsSupported = true; means lab will check the user setting to send a PDF Offerte back or not. (If the lab can support this.)|
537 -|2| | |Receives the request and checks the credentials.| | |
538 -|(% colspan="1" %)3|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)Credentials are valid, the Filecontent is checked on a valid Labassignment. When valid it will be processed and a OrderId is given.|(% colspan="1" %) |(% colspan="1" %)Laboratorium saves the Sample GUIDs if it's SIKB 13 or higher.
539 -Otherwise we use the idanlmons unique ID.|(% colspan="1" %)
540 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)Based on what customer, the order will be approved or the approve needs to be done in laboratorium system.|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
541 -|4| |<=|Sends back a Success with the new OrderId|ResultCode (),
702 +needsApprovalIsSupported = true; means lab will check the user setting to send a PDF Offerte back or not. (If the lab can support this.)|(% element-id="1156" %)
703 +(% element-id="1154" %)|(% element-id="1153" %)2|(% element-id="1152" %) |(% element-id="1150" %) |(% element-id="1148" %)Receives the request and checks the credentials.|(% element-id="1147" %) |(% element-id="1145" %) |(% element-id="1143" %)
704 +(% element-id="1141" %)|(% colspan="1" element-id="1140" %)3|(% colspan="1" element-id="1139" %) |(% colspan="1" element-id="1137" %) |(% colspan="1" element-id="1135" %)Credentials are valid, the Filecontent is checked on a valid Labassignment. When valid it will be processed and a OrderId is given.|(% colspan="1" element-id="1134" %) |(% colspan="1" element-id="1132" %)Laboratorium saves the Sample GUIDs if it's SIKB 13 or higher.
705 +Otherwise we use the idanlmons unique ID.|(% colspan="1" element-id="1130" %)
706 +(% element-id="1128" %)|(% colspan="1" element-id="1127" %) |(% colspan="1" element-id="1125" %) |(% colspan="1" element-id="1123" %) |(% colspan="1" element-id="1121" %)Based on what customer, the order will be approved or the approve needs to be done in laboratorium system.|(% colspan="1" element-id="1120" %) |(% colspan="1" element-id="1118" %) |(% colspan="1" element-id="1116" %)
707 +(% element-id="1114" %)|(% element-id="1113" %)4|(% element-id="1112" %) |(% element-id="1110" %)<=|(% element-id="1109" %)Sends back a Success with the new OrderId|(% element-id="1108" %)ResultCode (),
542 542  ErrorMessage (string),
543 543  OrderId (string),
544 544  NeedsApprove (bool),
545 545  FileContent_Base64 (string),
546 -UseZipStream/UseZip (bool, default: 'false'),|In the future labs will send back the PDF with the prices and some checks. To approve or cancel. For the first version this is not required yet and the fileContent remains empty.|1 = Success,
712 +UseZipStream/UseZip (bool, default: 'false'),|(% element-id="1102" %)In the future labs will send back the PDF with the prices and some checks. To approve or cancel. For the first version this is not required yet and the fileContent remains empty.|(% element-id="1101" %)1 = Success,
547 547  2 = GeneralError,
548 548  3 = WrongSIKBVersion,
549 549  4 = InvalidCredentials,
... ... @@ -553,8 +553,10 @@
553 553  8 = InvalidOrderId,
554 554  9 = OrderIdAlreadyApproved
555 555  10 = PDFNotAvailable
556 -|(% colspan="1" %)6|(% colspan="1" %)Receives the OrderId, and saves it.
557 - |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)(((
722 +(% element-id="1091" %)|(% colspan="1" element-id="1090" %)6|(% colspan="1" element-id="1089" %)Receives the OrderId, and saves it.
723 + |(% colspan="1" element-id="1086" %) |(% colspan="1" element-id="1084" %) |(% colspan="1" element-id="1082" %) |(% colspan="1" element-id="1080" %)(% element-id="1079" %)
724 +(((
725 +(% element-id="1078" %)
558 558  Default for now laboratorium will send:
559 559  NeedsApprove = False,
560 560  PDF = Empty,
... ... @@ -561,23 +561,25 @@
561 561  Zipstream = False,
562 562  
563 563  
732 +(% element-id="1072" %)
564 564  In the future, do something with the PDF and show the PDF to users to Approve or Cancel.
565 565  This will be done by; NeedsApprove = true.
566 566  \\If NeedsApprove is False, the order is Processed and can't be changed in TI. Like it is now.
567 567  
737 +(% element-id="1068" %)
568 568  
569 -)))|(% colspan="1" %)
570 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
571 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
572 -|(% colspan="1" %) |(% colspan="1" %)**IN THE FUTURE: APPROVEORDER**|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
573 -|(% colspan="1" %)7|(% colspan="1" %)Sends a request to the function: ApproveOrder().|(% colspan="1" %)=>|(% colspan="1" %) |(% colspan="1" %)WebserviceUsername (string),
739 +)))|(% colspan="1" element-id="1066" %)
740 +(% element-id="1064" %)|(% colspan="1" element-id="1063" %) |(% colspan="1" element-id="1061" %) |(% colspan="1" element-id="1059" %) |(% colspan="1" element-id="1057" %) |(% colspan="1" element-id="1055" %) |(% colspan="1" element-id="1053" %) |(% colspan="1" element-id="1051" %)
741 +(% element-id="1049" %)|(% colspan="1" element-id="1048" %) |(% colspan="1" element-id="1046" %) |(% colspan="1" element-id="1044" %) |(% colspan="1" element-id="1042" %) |(% colspan="1" element-id="1040" %) |(% colspan="1" element-id="1038" %) |(% colspan="1" element-id="1036" %)
742 +(% element-id="1034" %)|(% colspan="1" element-id="1033" %) |(% colspan="1" element-id="1031" %)(% element-id="1030" %)**IN THE FUTURE: APPROVEORDER**|(% colspan="1" element-id="1029" %) |(% colspan="1" element-id="1027" %) |(% colspan="1" element-id="1025" %) |(% colspan="1" element-id="1023" %) |(% colspan="1" element-id="1021" %)
743 +(% element-id="1019" %)|(% colspan="1" element-id="1018" %)7|(% colspan="1" element-id="1017" %)Sends a request to the function: ApproveOrder().|(% colspan="1" element-id="1016" %)=>|(% colspan="1" element-id="1015" %) |(% colspan="1" element-id="1013" %)WebserviceUsername (string),
574 574  WebservicePassword (string),
575 575  CustomerUsername (string),
576 -OrderId (string)|(% colspan="1" %) |(% colspan="1" %)
577 -|(% colspan="1" %)8|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)Receives the approve and checks the credentials and the OrderId.|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
578 -|(% colspan="1" %)9|(% colspan="1" %) |(% colspan="1" %)<=|(% colspan="1" %)Sends back a Success with the new CertificateNr|(% colspan="1" %)ResultCode (),
746 +OrderId (string)|(% colspan="1" element-id="1009" %) |(% colspan="1" element-id="1007" %)
747 +(% element-id="1005" %)|(% colspan="1" element-id="1004" %)8|(% colspan="1" element-id="1003" %) |(% colspan="1" element-id="1001" %) |(% colspan="1" element-id="999" %)Receives the approve and checks the credentials and the OrderId.|(% colspan="1" element-id="998" %) |(% colspan="1" element-id="996" %) |(% colspan="1" element-id="994" %)
748 +(% element-id="992" %)|(% colspan="1" element-id="991" %)9|(% colspan="1" element-id="990" %) |(% colspan="1" element-id="988" %)<=|(% colspan="1" element-id="987" %)Sends back a Success with the new CertificateNr|(% colspan="1" element-id="986" %)ResultCode (),
579 579  ErrorMessage (string),
580 -CertificateNr (string)|(% colspan="1" %)This process takes too long at some labs. Maybe this won't be workable...so maybe the CertificateNr return won't be possible. In this case, leave the CertificateNr empty. TerraIndex will read it from GetOrderStatus calls.|(% colspan="1" %)1 = Success,
750 +CertificateNr (string)|(% colspan="1" element-id="983" %)This process takes too long at some labs. Maybe this won't be workable...so maybe the CertificateNr return won't be possible. In this case, leave the CertificateNr empty. TerraIndex will read it from GetOrderStatus calls.|(% colspan="1" element-id="982" %)1 = Success,
581 581  2 = GeneralError,
582 582  3 = WrongSIKBVersion,
583 583  4 = InvalidCredentials,
... ... @@ -587,16 +587,16 @@
587 587  8 = InvalidOrderId,
588 588  9 = OrderIdAlreadyApproved
589 589  10 = PDFNotAvailable
590 -|(% colspan="1" %)10|(% colspan="1" %)Receives the CerificateNr and saves it.|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
591 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
592 -|(% colspan="1" %) |(% colspan="1" %)**IN THE FUTURE: CANCELORDER**|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
593 -|7|Sends a request to the function: CancelOrder().|=>| |WebserviceUsername (string),
760 +(% element-id="972" %)|(% colspan="1" element-id="971" %)10|(% colspan="1" element-id="970" %)Receives the CerificateNr and saves it.|(% colspan="1" element-id="969" %) |(% colspan="1" element-id="967" %) |(% colspan="1" element-id="965" %) |(% colspan="1" element-id="963" %) |(% colspan="1" element-id="961" %)
761 +(% element-id="959" %)|(% colspan="1" element-id="958" %) |(% colspan="1" element-id="956" %) |(% colspan="1" element-id="954" %) |(% colspan="1" element-id="952" %) |(% colspan="1" element-id="950" %) |(% colspan="1" element-id="948" %) |(% colspan="1" element-id="946" %)
762 +(% element-id="944" %)|(% colspan="1" element-id="943" %) |(% colspan="1" element-id="941" %)(% element-id="940" %)**IN THE FUTURE: CANCELORDER**|(% colspan="1" element-id="939" %) |(% colspan="1" element-id="937" %) |(% colspan="1" element-id="935" %) |(% colspan="1" element-id="933" %) |(% colspan="1" element-id="931" %)
763 +(% element-id="929" %)|(% element-id="928" %)7|(% element-id="927" %)Sends a request to the function: CancelOrder().|=(% element-id="926" %)>|(% element-id="925" %) |(% element-id="923" %)WebserviceUsername (string),
594 594  WebservicePassword (string),
595 595  CustomerUsername (string),
596 -OrderId (string)| |
597 -|8| | |Receives the cancel and checks the credentials and the OrderId.| | |
598 -|9| |<=|Sends back a Success |ResultCode (),
599 -ErrorMessage (string)| |1 = Success,
766 +OrderId (string)|(% element-id="919" %) |(% element-id="917" %)
767 +(% element-id="915" %)|(% element-id="914" %)8|(% element-id="913" %) |(% element-id="911" %) |(% element-id="909" %)Receives the cancel and checks the credentials and the OrderId.|(% element-id="908" %) |(% element-id="906" %) |(% element-id="904" %)
768 +(% element-id="902" %)|(% element-id="901" %)9|(% element-id="900" %) |(% element-id="898" %)<=|(% element-id="897" %)Sends back a Success |(% element-id="896" %)ResultCode (),
769 +ErrorMessage (string)|(% element-id="894" %) |(% element-id="892" %)1 = Success,
600 600  2 = GeneralError,
601 601  3 = WrongSIKBVersion,
602 602  4 = InvalidCredentials,
... ... @@ -606,324 +606,466 @@
606 606  8 = InvalidOrderId,
607 607  9 = OrderIdAlreadyApproved
608 608  10 = PDFNotAvailable
609 -|10|Removes the OrderId and the IsSend to False| | | |If OrderIsAleadyApproved, set the values to Approved and keep the OrderId and IsSend.|
610 -|(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %) |(% colspan="1" %)
779 +(% element-id="882" %)|(% element-id="881" %)10|(% element-id="880" %)Removes the OrderId and the IsSend to False|(% element-id="879" %) |(% element-id="877" %) |(% element-id="875" %) |(% element-id="873" %)If OrderIsAleadyApproved, set the values to Approved and keep the OrderId and IsSend.|(% element-id="872" %)
780 +(% element-id="870" %)|(% colspan="1" element-id="869" %) |(% colspan="1" element-id="867" %) |(% colspan="1" element-id="865" %) |(% colspan="1" element-id="863" %) |(% colspan="1" element-id="861" %) |(% colspan="1" element-id="859" %) |(% colspan="1" element-id="857" %)
611 611  
612 -== Create Order ==
782 +(% element-id="855" %)
783 +== (% element-id="854" %)Create Order(%%) ==
613 613  
614 -=== Request example ===
785 +(% element-id="853" %)
786 +=== (% element-id="852" %)Request example(%%) ===
615 615  
616 -|(((
788 +(% element-id="851" %)
789 +(% element-id="849" %)|(% element-id="848" %)(% element-id="847" %)
790 +(((
791 +(% element-id="846" %)
617 617  public CreateOrderResponse.Response SendLabAssignment(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, string sikbVersion, string assignmentXML, string languageCode, bool needsApprovalIsSupported = false)
618 618  
794 +(% element-id="845" %)
619 619   {
620 620  
797 +(% element-id="844" %)
621 621   CreateOrderResponse.Response set = new CreateOrderResponse.Response();
622 622  
623 623  
801 +(% element-id="841" %)
624 624   try
625 625  
804 +(% element-id="840" %)
626 626   {
627 627  
807 +(% element-id="839" %)
628 628   bool useZipstream = true;
629 629  
630 630  
811 +(% element-id="836" %)
631 631   MultipartFormDataContent content = new MultipartFormDataContent();
632 632  
633 633  
815 +(% element-id="833" %)
634 634   ~/~/Add Formdata
635 635  
818 +(% element-id="832" %)
636 636   var formDataDictionary = new[]
637 637  
821 +(% element-id="831" %)
638 638   {
639 639  
824 +(% element-id="830" %)
640 640   new KeyValuePair<string, string>("userName", WebserviceUsername),
641 641  
827 +(% element-id="829" %)
642 642   new KeyValuePair<string, string>("password", WebservicePassword),
643 643  
830 +(% element-id="828" %)
644 644   new KeyValuePair<string, string>("customerUserName", CustomerUsername),
645 645  
833 +(% element-id="827" %)
646 646   new KeyValuePair<string, string>("clientId", customerid),
647 647  
836 +(% element-id="826" %)
648 648   new KeyValuePair<string, string>("sikbVersion", sikbVersion),
649 649  
839 +(% element-id="825" %)
650 650   new KeyValuePair<string, string>("languageCode", languageCode),
651 651  
842 +(% element-id="824" %)
652 652   new KeyValuePair<string, string>("useZip", useZipstream.ToString() ),
653 653  
845 +(% element-id="823" %)
654 654   new KeyValuePair<string, string>("needsApprovalIsSupported", needsApprovalIsSupported.ToString() ),
655 655  
848 +(% element-id="822" %)
656 656   ~/~/new KeyValuePair<string, string>("orderXml", ZipStreamHelper.CompressToBase64String(assignmentXML)),
657 657  
851 +(% element-id="821" %)
658 658   ~/~/new KeyValuePair<string, string>("orderXml", assignmentXML),
659 659  
854 +(% element-id="820" %)
660 660   };              
661 661  
857 +(% element-id="819" %)
662 662   foreach (var item in formDataDictionary)
663 663  
860 +(% element-id="818" %)
664 664   {
665 665  
863 +(% element-id="817" %)
666 666   content.Add(new StringContent(item.Value), $"\"{item.Key}\"");
667 667  
866 +(% element-id="816" %)
668 668   }
669 669  
670 670  
870 +(% element-id="813" %)
671 671   string filexml = string.Empty;
672 672  
873 +(% element-id="812" %)
673 673   if (useZipstream)
674 674  
876 +(% element-id="811" %)
675 675   {
676 676  
879 +(% element-id="810" %)
677 677   filexml = ZipStreamHelper.CompressToBase64String(assignmentXML);
678 678  
882 +(% element-id="809" %)
679 679   }
680 680  
885 +(% element-id="808" %)
681 681   else
682 682  
888 +(% element-id="807" %)
683 683   {
684 684  
891 +(% element-id="806" %)
685 685   filexml = assignmentXML;
686 686  
894 +(% element-id="805" %)
687 687   }
688 688  
689 689  
898 +(% element-id="802" %)
690 690   ~/~/Add filecontent
691 691  
901 +(% element-id="801" %)
692 692   var fileContent = new ByteArrayContent(ZipStreamHelper.stringToByteArray(filexml));
693 693  
904 +(% element-id="800" %)
694 694   fileContent.Headers.ContentDisposition =
695 695  
907 +(% element-id="799" %)
696 696   new System.Net.Http.Headers.ContentDispositionHeaderValue("form-data") ~/~/<- 'form-data' instead of 'attachment'
697 697  
910 +(% element-id="798" %)
698 698   {
699 699  
913 +(% element-id="797" %)
700 700   Name = "\"orderXml\"", ~/~/ \" is needed so the message contains the quotes, wihtout it will fail
701 701  
916 +(% element-id="796" %)
702 702   FileName = "\"VivaTerraIndexAssignment.xml\""
703 703  
919 +(% element-id="795" %)
704 704   };
705 705  
922 +(% element-id="794" %)
706 706   fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse("application/xml");              
707 707  
925 +(% element-id="793" %)
708 708   content.Add(fileContent);
709 709  
710 710  
929 +(% element-id="790" %)
711 711   ~/~/Start sending
712 712  
713 713  
933 +(% element-id="787" %)
714 714   HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/CreateOrder", content).Result;
715 715  
936 +(% element-id="786" %)
716 716   response.EnsureSuccessStatusCode();
717 717  
939 +(% element-id="785" %)
718 718   string responseMessage = response.Content.ReadAsStringAsync().Result;
719 719  
720 720  
943 +(% element-id="782" %)
721 721   if (string.IsNullOrEmpty(responseMessage))
722 722  
946 +(% element-id="781" %)
723 723   {
724 724  
949 +(% element-id="780" %)
725 725   throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /CreateOrder" + "]");
726 726  
952 +(% element-id="779" %)
727 727   }
728 728  
955 +(% element-id="778" %)
729 729   using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~)
730 730  
958 +(% element-id="777" %)
731 731   {
732 732  
961 +(% element-id="776" %)
733 733   XmlSerializer serializer = new XmlSerializer(typeof(CreateOrderResponse.Response));
734 734  
964 +(% element-id="775" %)
735 735   set = (CreateOrderResponse.Response)serializer.Deserialize(ms);
736 736  
967 +(% element-id="774" %)
737 737   }
738 738  
739 739  
971 +(% element-id="771" %)
740 740   ~/~/Can contain a PDf with price information
741 741  
974 +(% element-id="770" %)
742 742   if (set.UseZip && !string.IsNullOrEmpty(set.FileContent))
743 743  
977 +(% element-id="769" %)
744 744   {
745 745  
980 +(% element-id="768" %)
746 746   ~/~/convert from base64 string back to normal
747 747  
983 +(% element-id="767" %)
748 748   set.FileContent = ZipStreamHelper.DecompressBase64StringToString(set.FileContent);                  
749 749  
986 +(% element-id="766" %)
750 750   }
751 751  
752 752  
990 +(% element-id="763" %)
753 753   }
754 754  
993 +(% element-id="762" %)
755 755   catch (Exception ex)
756 756  
996 +(% element-id="761" %)
757 757   {
758 758  
999 +(% element-id="760" %)
759 759   #region handle exception
760 760  
761 761  
1003 +(% element-id="757" %)
762 762   set.Status = new BusinessEntities.LabRestService.CreateOrderResponse.ResponseStatus();
763 763  
1006 +(% element-id="756" %)
764 764   set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString();
765 765  
1009 +(% element-id="755" %)
766 766   set.Status.ErrorMessage = "Exception occurred in CreateOrder (username: " + WebserviceUsername + ") with message: " + ex.Message;
767 767  
768 768  
1013 +(% element-id="752" %)
769 769   ex.Data.Add("WebserviceUsername", WebserviceUsername);
770 770  
1016 +(% element-id="751" %)
771 771   ex.Data.Add("WebservicePassword", WebservicePassword);
772 772  
1019 +(% element-id="750" %)
773 773   ex.Data.Add("CustomerUsername", CustomerUsername);
774 774  
1022 +(% element-id="749" %)
775 775   ex.Data.Add("sikbVersion", sikbVersion);
776 776  
1025 +(% element-id="748" %)
777 777   ex.Data.Add("customerid", customerid);
778 778  
779 779  
1029 +(% element-id="745" %)
780 780   ExceptionHandler.HandleException(ex);
781 781  
1032 +(% element-id="744" %)
782 782   #endregion
783 783  
1035 +(% element-id="743" %)
784 784   }
785 785  
786 786  
1039 +(% element-id="740" %)
787 787   return set;
788 788  
1042 +(% element-id="739" %)
789 789   }
790 790  )))
791 791  
792 -|(((
1046 +(% element-id="738" %)
1047 +(% element-id="736" %)|(% element-id="735" %)(% element-id="734" %)
1048 +(((
1049 +(% element-id="733" %)
793 793  POST https:~/~/<URL>/CreateOrder HTTP/1.1
794 794  
1052 +(% element-id="732" %)
795 795  Content-Type: multipart/form-data; boundary="28a3e130-70c9-4a1a-b544-a802a1ade6ca"
796 796  
1055 +(% element-id="731" %)
797 797  Host: 81.175.89.24
798 798  
1058 +(% element-id="730" %)
799 799  Content-Length: 5010
800 800  
1061 +(% element-id="729" %)
801 801  Expect: 100-continue
802 802  
803 803  
1065 +(% element-id="726" %)
804 804  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
805 805  
1068 +(% element-id="725" %)
806 806  Content-Type: text/plain; charset=utf-8
807 807  
1071 +(% element-id="724" %)
808 808  Content-Disposition: form-data; name="userName"
809 809  
810 810  
1075 +(% element-id="721" %)
811 811  <Webservice_Username>
812 812  
1078 +(% element-id="720" %)
813 813  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
814 814  
1081 +(% element-id="719" %)
815 815  Content-Type: text/plain; charset=utf-8
816 816  
1084 +(% element-id="718" %)
817 817  Content-Disposition: form-data; name="password"
818 818  
819 819  
1088 +(% element-id="715" %)
820 820  <Webservice_Password>
821 821  
1091 +(% element-id="714" %)
822 822  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
823 823  
1094 +(% element-id="713" %)
824 824  Content-Type: text/plain; charset=utf-8
825 825  
1097 +(% element-id="712" %)
826 826  Content-Disposition: form-data; name="customerUserName"
827 827  
828 828  
1101 +(% element-id="709" %)
829 829  <Customer_Username or token>
830 830  
1104 +(% element-id="708" %)
831 831  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
832 832  
1107 +(% element-id="707" %)
833 833  Content-Type: text/plain; charset=utf-8
834 834  
1110 +(% element-id="706" %)
835 835  Content-Disposition: form-data; name="clientId"
836 836  
837 837  
1114 +(% element-id="703" %)
838 838  300
839 839  
1117 +(% element-id="702" %)
840 840  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
841 841  
1120 +(% element-id="701" %)
842 842  Content-Type: text/plain; charset=utf-8
843 843  
1123 +(% element-id="700" %)
844 844  Content-Disposition: form-data; name="sikbVersion"
845 845  
846 846  
1127 +(% element-id="697" %)
847 847  13.4.0
848 848  
1130 +(% element-id="696" %)
849 849  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
850 850  
1133 +(% element-id="695" %)
851 851  Content-Type: text/plain; charset=utf-8
852 852  
1136 +(% element-id="694" %)
853 853  Content-Disposition: form-data; name="languageCode"
854 854  
855 855  
1140 +(% element-id="691" %)
856 856  nld
857 857  
1143 +(% element-id="690" %)
858 858  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
859 859  
1146 +(% element-id="689" %)
860 860  Content-Type: text/plain; charset=utf-8
861 861  
1149 +(% element-id="688" %)
862 862  Content-Disposition: form-data; name="useZip"
863 863  
864 864  
1153 +(% element-id="685" %)
865 865  True
866 866  
1156 +(% element-id="684" %)
867 867  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
868 868  
1159 +(% element-id="683" %)
869 869  Content-Type: text/plain; charset=utf-8
870 870  
1162 +(% element-id="682" %)
871 871  Content-Disposition: form-data; name="needsApprovalIsSupported"
872 872  
873 873  
1166 +(% element-id="679" %)
874 874  False
875 875  
1169 +(% element-id="678" %)
876 876  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca
877 877  
1172 +(% element-id="677" %)
878 878  Content-Disposition: form-data; name="orderXml"; filename="VivaTerraIndexAssignment.xml"
879 879  
1175 +(% element-id="676" %)
880 880  Content-Type: application/xml
881 881  
882 882  
1179 +(% element-id="673" %)
883 883  <SIKB File in Zip stream Base64  encoding>
884 884  
1182 +(% element-id="672" %)
885 885  ~-~-28a3e130-70c9-4a1a-b544-a802a1ade6ca~-~-
886 886  )))
887 887  
888 -=== Response example ===
1186 +(% element-id="671" %)
1187 +=== (% element-id="670" %)Response example(%%) ===
889 889  
890 -|(((
1189 +(% element-id="669" %)
1190 +(% element-id="667" %)|(% element-id="666" %)(% element-id="665" %)
1191 +(((
1192 +(% element-id="664" %)
891 891  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
892 892  
1195 +(% element-id="663" %)
893 893  <Response>
894 894  
1198 +(% element-id="662" %)
895 895  <OrderId>7113828</OrderId>
896 896  
1201 +(% element-id="661" %)
897 897  <NeedsApproval>True</NeedsApproval>
898 898  
1204 +(% element-id="660" %)
899 899  <FileContent></FileContent>
900 900  
1207 +(% element-id="659" %)
901 901  <Status>
902 902  
1210 +(% element-id="658" %)
903 903   <StatusCode>1</StatusCode>
904 904  
1213 +(% element-id="657" %)
905 905   <StatusCodeDescription>OK</StatusCodeDescription>
906 906  
1216 +(% element-id="656" %)
907 907   <ErrorMessage></ErrorMessage>
908 908  
1219 +(% element-id="655" %)
909 909  </Status></Response>
910 910  )))
911 911  
1223 +(% element-id="654" %)
1224 += (% element-id="653" %)Get Order status and Results(%%) =
912 912  
913 -= Get Order status and Results =
1226 +(% element-id="652" %)
1227 +== (% element-id="651" %)Soluion/Design(%%) ==
914 914  
915 -== Oplossing/Design ==
1229 +(% element-id="650" %)
1230 +TerraIndex will request per license/customer which results are ready. These are queried if the latest changes are newer than the last check. This way we never download too much unnecessarily and it can always be requested again.
916 916  
917 -TerraIndex gaat opvragen per licentie, welke resultaten en klaar staan. Deze worden opgevraagd als de nieuwste wijzigingen nieuwer zijn dan de laatste keer checken. Zo downloaden we nooit onnodig teveel en is het altijd nogmaals op te vragen.
918 -
919 -
920 -(% class="table-hover" %)
921 -|Action|TerraIndex| |Laboratorium|Parameters/Message|Remarks|ResultCodes
922 -|1|Sends a request to the function: GetCustomers().|=>| |WebserviceUsername (string), 
1232 +(% class="table-hover" element-id="647" %)
1233 +(% element-id="645" %)|(% element-id="644" %)Action|(% element-id="643" %)TerraIndex|(% element-id="642" %) |(% element-id="640" %)Laboratorium|(% element-id="639" %)Parameters/Message|(% element-id="638" %)Remarks|(% element-id="637" %)ResultCodes
1234 +(% element-id="636" %)|(% element-id="635" %)1|(% element-id="634" %)Sends a request to the function: GetCustomers().|=(% element-id="633" %)>|(% element-id="632" %) |(% element-id="630" %)WebserviceUsername (string), 
923 923  WebservicePassword (string),
924 -CustomerUsername (string)|We want to skip the Password of the customer, and we introduce the WebserviceUsername + WebservicePassword.|
925 -|2| | |Receives the request and check the customers this username and searches the dateLastChanged for this Customer.| | |
926 -|3| |<=|Sends back the list of customers with the lastChangedTimestamp|ResultCode (),
1236 +CustomerUsername (string)|(% element-id="627" %)We want to skip the Password of the customer, and we introduce the WebserviceUsername + WebservicePassword.|(% element-id="626" %)
1237 +(% element-id="624" %)|(% element-id="623" %)2|(% element-id="622" %) |(% element-id="620" %) |(% element-id="618" %)Receives the request and check the customers this username and searches the dateLastChanged for this Customer.|(% element-id="617" %) |(% element-id="615" %) |(% element-id="613" %)
1238 +(% element-id="611" %)|(% element-id="610" %)3|(% element-id="609" %) |(% element-id="607" %)<=|(% element-id="606" %)Sends back the list of customers with the lastChangedTimestamp|(% element-id="605" %)ResultCode (),
927 927  ErrorMessage (string),
928 928  List<customer> , Customer:
929 929  CustomerCode (string),
... ... @@ -930,7 +930,7 @@
930 930  CustomerName (string),
931 931  LabID (int),
932 932  LabName (string),
933 -ChangedTimeStamp (DateTime)|We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|1 = Success,
1245 +ChangedTimeStamp (DateTime)|(% element-id="597" %)We receive the dateTimestamp instead of sending it, so we always get the full list and we are also able to delete customercodes.|(% element-id="596" %)1 = Success,
934 934  2 = GeneralError,
935 935  3 = WrongSIKBVersion,
936 936  4 = InvalidCredentials,
... ... @@ -940,15 +940,15 @@
940 940  8 = InvalidOrderId,
941 941  9 = OrderIdAlreadyApproved
942 942  10 = PDFNotAvailable
943 -|4|Receives the list of Customers. Read the Timestamp this Customer is last checked for Results/Statuses.| | | | |
944 -|5|Send for each Customer a  call to retreive all orders statuses changes since a certain timestamp.
945 -Function: GetOrderStatuses()|=>| |WebserviceUsername (string), 
1255 +(% element-id="586" %)|(% element-id="585" %)4|(% element-id="584" %)Receives the list of Customers. Read the Timestamp this Customer is last checked for Results/Statuses.|(% element-id="583" %) |(% element-id="581" %) |(% element-id="579" %) |(% element-id="577" %) |(% element-id="575" %)
1256 +(% element-id="573" %)|(% element-id="572" %)5|(% element-id="571" %)Send for each Customer a  call to retreive all orders statuses changes since a certain timestamp.
1257 +Function: GetOrderStatuses()|=(% element-id="569" %)>|(% element-id="568" %) |(% element-id="566" %)WebserviceUsername (string), 
946 946  WebservicePassword (string),
947 947  CustomerUsername (string),
948 948  CustomerCode (string),
949 -LastCheckedTimestamp (DateTime)|TerraIndex keeps track of the last check timestamp for each license.|
950 -|6| | |Receives the request and check the orders that are changed since the timestamp for this Customer.| | |
951 -|7| |<=|Sends back the list of orders with the status and lastChangedTimestamp|ResultCode (),
1261 +LastCheckedTimestamp (DateTime)|(% element-id="561" %)TerraIndex keeps track of the last check timestamp for each license.|(% element-id="560" %)
1262 +(% element-id="558" %)|(% element-id="557" %)6|(% element-id="556" %) |(% element-id="554" %) |(% element-id="552" %)Receives the request and check the orders that are changed since the timestamp for this Customer.|(% element-id="551" %) |(% element-id="549" %) |(% element-id="547" %)
1263 +(% element-id="545" %)|(% element-id="544" %)7|(% element-id="543" %) |(% element-id="541" %)<=|(% element-id="540" %)Sends back the list of orders with the status and lastChangedTimestamp|(% element-id="539" %)ResultCode (),
952 952  ErrorMessage (string),
953 953  OrderID (string),
954 954  LabassignmentGUID (GUID),
... ... @@ -955,10 +955,10 @@
955 955  CertificateNumber (string)
956 956  OrderStatusSIKB (int),
957 957  Delayed (boolean),
958 -ExpectedTimeStamp (DateTime),|OrderStatusSIKB is the SIKB Labassignment status.
1270 +ExpectedTimeStamp (DateTime),|(% element-id="531" %)OrderStatusSIKB is the SIKB Labassignment status.
959 959  \\Delayed is a boolean to tell the customer a order will be later ready then expected. The ExpectedTimestamp.
960 960  If Delayed for the firsttime, TerraIndex can send a notification to the users and show a different layout.
961 -\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|1 = Success,
1273 +\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|(% element-id="525" %)1 = Success,
962 962  2 = GeneralError,
963 963  3 = WrongSIKBVersion,
964 964  4 = InvalidCredentials,
... ... @@ -968,22 +968,22 @@
968 968  8 = InvalidOrderId,
969 969  9 = OrderIdAlreadyApproved
970 970  10 = PDFNotAvailable
971 -|8|Receives the list of Orders with status.
972 -Update the CertificateNr if this is not already present in the labassignment. | | | |CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.|
973 -|9|Send for each Order a call to retreive all results.
974 -Function: GetOrderResults()|=>| |WebserviceUsername (string), 
1283 +(% element-id="515" %)|(% element-id="514" %)8|(% element-id="513" %)Receives the list of Orders with status.
1284 +Update the CertificateNr if this is not already present in the labassignment. |(% element-id="511" %) |(% element-id="509" %) |(% element-id="507" %) |(% element-id="505" %)CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.|(% element-id="504" %)
1285 +(% element-id="502" %)|(% element-id="501" %)9|(% element-id="500" %)Send for each Order a call to retreive all results.
1286 +Function: GetOrderResults()|=(% element-id="498" %)>|(% element-id="497" %) |(% element-id="495" %)WebserviceUsername (string), 
975 975  WebservicePassword (string),
976 976  CustomerUsername (string),
977 977  CustomerCode (string),
978 978  OrderID (string),
979 -SIKBVersion (string, default: '13.4.0')|Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc.|
980 -|10| | |Receives the request and creates a SIKB results file based on the version that is requested.| | |
981 -|11| |<=|Sends back the results of the orders.|ResultCode (),
1291 +SIKBVersion (string, default: '13.4.0')|(% element-id="489" %)Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc.|(% element-id="488" %)
1292 +(% element-id="486" %)|(% element-id="485" %)10|(% element-id="484" %) |(% element-id="482" %) |(% element-id="480" %)Receives the request and creates a SIKB results file based on the version that is requested.|(% element-id="479" %) |(% element-id="477" %) |(% element-id="475" %)
1293 +(% element-id="473" %)|(% element-id="472" %)11|(% element-id="471" %) |(% element-id="469" %)<=|(% element-id="468" %)Sends back the results of the orders.|(% element-id="467" %)ResultCode (),
982 982  ErrorMessage (string),
983 983  OrderId (string),
984 984  LabassignmentGUID (GUID),
985 985  FileContent_Base64 (string),
986 -UseZipStream/UseZip (bool, default: 'false'),| |1 = Success,
1298 +UseZipStream/UseZip (bool, default: 'false'),|(% element-id="461" %) |(% element-id="459" %)1 = Success,
987 987  2 = GeneralError,
988 988  3 = WrongSIKBVersion,
989 989  4 = InvalidCredentials,
... ... @@ -993,9 +993,12 @@
993 993  8 = InvalidOrderId,
994 994  9 = OrderIdAlreadyApproved
995 995  10 = PDFNotAvailable
996 -|12|Receives the results and imports all results.| | | |(((
1308 +(% element-id="449" %)|(% element-id="448" %)12|(% element-id="447" %)Receives the results and imports all results.|(% element-id="446" %) |(% element-id="444" %) |(% element-id="442" %) |(% element-id="440" %)(% element-id="439" %)
1309 +(((
1310 +(% element-id="438" %)
997 997  Import will be done to corresponding samples based on:
998 998  
1313 +(% element-id="437" %)
999 999  * Find Project by ProjectGUID (as provided in the labassignment)
1000 1000  * Find Project by ProjectCode (as provided in the Labassignment)
1001 1001  * Find Project and Labassignment by LabassignmentGUID (as provided in the Labassignment)
... ... @@ -1004,25 +1004,27 @@
1004 1004  For lower version Labassignments the lab should return the 'old' idanlmons as SampleGUID in the XML.
1005 1005  * Find Samples (only if Project is already found ) by SampleName
1006 1006  
1322 +(% element-id="429" %)
1007 1007  What is imported?
1008 1008  
1325 +(% element-id="428" %)
1009 1009  * If Sample is found, the results in the XML are always all updated and/or inserted.
1010 1010  * If Project is found, but the sample is not; The Sample and the results are inserted as new Sample. (If watersample; fake filtertube and fake measurementpoints are created)
1011 -)))|
1012 -|13|If OrderStatus is 'Completed/Reported' (SIKBID: 5)
1328 +)))|(% element-id="425" %)
1329 +(% element-id="423" %)|(% element-id="422" %)13|(% element-id="421" %)If OrderStatus is 'Completed/Reported' (SIKBID: 5)
1013 1013  Request the PDF certificate.
1014 -Function: GetOrderPDF()|=>| |WebserviceUsername (string), 
1331 +Function: GetOrderPDF()|=(% element-id="418" %)>|(% element-id="417" %) |(% element-id="415" %)WebserviceUsername (string), 
1015 1015  WebservicePassword (string),
1016 1016  CustomerUsername (string),
1017 1017  CustomerCode (string),
1018 -OrderID (string),| |
1019 -|14| | |Receives the request and creates the PDF for the Order.| | |
1020 -|15| |<=|Sends back the PDF of the order.|ResultCode (),
1335 +OrderID (string),|(% element-id="410" %) |(% element-id="408" %)
1336 +(% element-id="406" %)|(% element-id="405" %)14|(% element-id="404" %) |(% element-id="402" %) |(% element-id="400" %)Receives the request and creates the PDF for the Order.|(% element-id="399" %) |(% element-id="397" %) |(% element-id="395" %)
1337 +(% element-id="393" %)|(% element-id="392" %)15|(% element-id="391" %) |(% element-id="389" %)<=|(% element-id="388" %)Sends back the PDF of the order.|(% element-id="387" %)ResultCode (),
1021 1021  ErrorMessage (string),
1022 1022  OrderId (string),
1023 1023  LabassignmentGUID (GUID),
1024 1024  FileContent_Base64 (string),
1025 -UseZipStream/UseZip (bool, default: 'false'),|If the PDF is not available yet, please give the resultcode: PDFNotAvailable.|1 = Success,
1342 +UseZipStream/UseZip (bool, default: 'false'),|(% element-id="381" %)If the PDF is not available yet, please give the resultcode: PDFNotAvailable.|(% element-id="380" %)1 = Success,
1026 1026  2 = GeneralError,
1027 1027  3 = WrongSIKBVersion,
1028 1028  4 = InvalidCredentials,
... ... @@ -1032,27 +1032,31 @@
1032 1032  8 = InvalidOrderId,
1033 1033  9 = OrderIdAlreadyApproved
1034 1034  10 = PDFNotAvailable
1035 -|12|Receives the PDF and stores it for reporting and downloading.| | | | |
1352 +(% element-id="370" %)|(% element-id="369" %)12|(% element-id="368" %)Receives the PDF and stores it for reporting and downloading.|(% element-id="367" %) |(% element-id="365" %) |(% element-id="363" %) |(% element-id="361" %) |(% element-id="359" %)
1036 1036  
1037 -=
1038 -Customer wants to see real time information about the status in the interface =
1354 +(% element-id="357" %)
1355 += (% element-id="356" %)
1356 +Customer wants to see real time information about the status in the interface(%%) =
1039 1039  
1040 -== Oplossing/Design ==
1358 +(% element-id="354" %)
1359 +== (% element-id="353" %)Solution/Design(%%) ==
1041 1041  
1042 -Om in de interface van TerraIndex altijd up to date informatie te tonen als een gebruiker een labopdracht opent om de status te zien, hergebruiken we een deel van de GetOrderStatus, maar dan met specifiek een OrderID.
1361 +(% element-id="352" %)
1362 +To always show up-to-date information in the TerraIndex interface when a user opens a lab assignment to see the status, we reuse part of the GetOrderStatus, but with a specific OrderID.
1043 1043  
1364 +(% element-id="351" %)
1044 1044  ..NOT SUPPORTED YET...
1045 1045  
1046 -(% class="table-hover" %)
1047 -|(% colspan="1" %)Action|(% colspan="1" %)TerraIndex|(% colspan="1" %) |(% colspan="1" %)Laboratorium|(% colspan="1" %)Parameters/Message|(% colspan="1" %)Remarks|(% colspan="1" %)ResultCodes
1048 -|1|Request the Order status for a single Order/Labassignment.
1049 -Function: GetOrderStatus()|=>| |WebserviceUsername (string), 
1367 +(% class="table-hover" element-id="350" %)
1368 +(% element-id="348" %)|(% colspan="1" element-id="347" %)Action|(% colspan="1" element-id="346" %)TerraIndex|(% colspan="1" element-id="345" %) |(% colspan="1" element-id="343" %)Laboratorium|(% colspan="1" element-id="342" %)Parameters/Message|(% colspan="1" element-id="341" %)Remarks|(% colspan="1" element-id="340" %)ResultCodes
1369 +(% element-id="339" %)|(% element-id="338" %)1|(% element-id="337" %)Request the Order status for a single Order/Labassignment.
1370 +Function: GetOrderStatus()|=(% element-id="335" %)>|(% element-id="334" %) |(% element-id="332" %)WebserviceUsername (string), 
1050 1050  WebservicePassword (string),
1051 1051  CustomerUsername (string),
1052 1052  CustomerCode (string),
1053 -OrderID (string),| |
1054 -|2| | |Receives the request and gets the status for the Order.| | |
1055 -|3| |<=|Sends back the status of the order.|ResultCode (),
1374 +OrderID (string),|(% element-id="327" %) |(% element-id="325" %)
1375 +(% element-id="323" %)|(% element-id="322" %)2|(% element-id="321" %) |(% element-id="319" %) |(% element-id="317" %)Receives the request and gets the status for the Order.|(% element-id="316" %) |(% element-id="314" %) |(% element-id="312" %)
1376 +(% element-id="310" %)|(% element-id="309" %)3|(% element-id="308" %) |(% element-id="306" %)<=|(% element-id="305" %)Sends back the status of the order.|(% element-id="304" %)ResultCode (),
1056 1056  ErrorMessage (string),
1057 1057  OrderID (string),
1058 1058  LabassignmentGUID (GUID),
... ... @@ -1059,10 +1059,10 @@
1059 1059  CertificateNumber (string)
1060 1060  OrderStatusSIKB (int),
1061 1061  Delayed (boolean),
1062 -ExpectedTimeStamp (DateTime),|OrderStatusSIKB is the SIKB Labassignment status.
1383 +ExpectedTimeStamp (DateTime),|(% element-id="296" %)OrderStatusSIKB is the SIKB Labassignment status.
1063 1063  \\Delayed is a boolean to tell the customer a order will be later ready then expected. The ExpectedTimestamp.
1064 1064  If Delayed for the firsttime, TerraIndex can send a notification to the users and show a different layout.
1065 -\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|1 = Success,
1386 +\\LabassignmentGUID is filled to support also Labassignments that are not from TerraIndex Ordered.|(% element-id="290" %)1 = Success,
1066 1066  2 = GeneralError,
1067 1067  3 = WrongSIKBVersion,
1068 1068  4 = InvalidCredentials,
... ... @@ -1072,10 +1072,9 @@
1072 1072  8 = InvalidOrderId,
1073 1073  9 = OrderIdAlreadyApproved
1074 1074  10 = PDFNotAvailable
1075 -|4|Receives the status and shows in the interface the updated info.
1076 -Update the CertificateNr if this is not already present in the labassignment. | | | |CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.|
1396 +(% element-id="280" %)|(% element-id="279" %)4|(% element-id="278" %)Receives the status and shows in the interface the updated info.
1397 +Update the CertificateNr if this is not already present in the labassignment. |(% element-id="276" %) |(% element-id="274" %) |(% element-id="272" %) |(% element-id="270" %)CertifcateNumber could be new here, if the lab wasn't able to fill it directly at the ApproveOrder.|(% element-id="269" %)
1077 1077  
1078 1078  
1079 -
1080 -
1081 -
1400 +(% element-id="265" %)
1401 +