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

From version 7.1
edited by Robin Huisman
on 2024/04/04 11:29
Change comment: There is no comment for this version
To version 3.1
edited by Robin Huisman
on 2022/02/08 11:50
Change comment: There is no comment for this version

Summary

Details

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