Last modified by Nico Lemaire on 2025/05/06 15:49
From version 9.1
edited by Robin Huisman
on 2024/04/05 16:13
on 2024/04/05 16:13
Change comment:
Uploaded new attachment "Lab exchange.svg", version {1}
To version 23.1
edited by Robin Huisman
on 2024/09/06 11:29
on 2024/09/06 11:29
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 5 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -3,15 +3,31 @@ 3 3 4 4 = Digital Lab Exchange process = 5 5 6 -The flow diagram gives a small overview of what the data flow of a lab assignment is. Every green block shows a step of the lab assignment process. From top to bottom these steps are: 6 +The flow diagram gives a small overview of what the data flow of a lab assignment is. 7 +Every block shows a step of the lab assignment process. From top to bottom these steps are: 7 7 8 8 1. Showing the laboratory and all the analyses that can be requested as an option to the user. 9 9 1. The user creating a lab assignment and sending it to the lab trough TerraIndex. 10 -1. The lab sending the analysis results back to the TerraIndex.11 +1. The lab delivering the analysis results back to the TerraIndex. 11 11 13 +[[attach:Lab exchange.svg||rel="noopener noreferrer" target="_blank"]] [[attach:Lab exchange.txt||rel="noopener noreferrer" target="_blank"]] 12 12 15 +[[image:1712326465681-980.png||height="315" width="630"]] 13 13 17 + 18 +[[image:1712326492306-381.png||height="781" width="635"]] 19 + 20 +~==> TODO; add option to confirm order based on the Order price PDF 21 + 22 + 23 +[[image:1712326520488-924.png||height="312" width="632"]] 24 + 25 +~==> TODO; add option download labcertificate 26 + 14 14 (% element-id="1884" %) 28 += = 29 + 30 +(% element-id="1884" %) 15 15 = (% element-id="1883" %)Firewall IP-Addresses of TerraIndex(%%) = 16 16 17 17 (% element-id="1882" %) ... ... @@ -29,10 +29,18 @@ 29 29 Production outbound 30 30 40.115.34.64 31 31 48 +Production outbound (ftp): 49 + 50 +20.54.163.29, 20.54.163.30, 20.54.163.34, 20.54.163.36, 20.54.163.43, 20.50.134.53, 20.54.163.47, 20.54.163.57, 20.54.163.61, 20.54.163.68, 20.54.163.76, 20.54.163.79, 51.105.111.203, 20.50.147.106, 20.50.148.51, 20.50.148.60, 20.50.146.193, 20.50.148.123, 20.50.148.128, 20.50.148.159, 51.138.21.31, 20.50.148.164, 20.50.148.172, 51.105.105.244, 20.54.163.90, 20.54.163.94, 20.54.163.100, 20.73.28.18, 20.73.28.145, 20.73.29.144, 20.50.2.9 51 + 32 32 (% element-id="1873" %) 33 33 Test outbound 34 34 13.73.138.173 35 35 56 +Test outbound (ftp): 57 + 58 +51.138.62.216, 51.138.62.232, 51.138.62.241, 51.138.63.1, 51.138.63.19, 51.138.63.30, 51.138.63.43, 51.137.2.110, 51.138.63.49, 51.138.63.70, 51.138.63.82, 51.138.63.94, 51.138.63.102, 51.105.249.46, 51.137.7.98, 51.138.63.17, 51.137.6.51, 51.138.63.159, 51.138.63.175, 51.138.63.189, 51.138.63.234, 20.61.224.11, 20.61.224.20, 20.61.224.37, 20.61.224.50, 52.236.158.189, 52.236.159.215, 52.157.223.174, 52.157.223.203, 40.74.33.17, 20.50.2.44 59 + 36 36 (% element-id="1871" %) 37 37 CD/CI outbound 38 38 40.114.238.16 ... ... @@ -89,6 +89,9 @@ 89 89 90 90 (% element-id="1752" %) 91 91 Besides SIKB 13.4.0, TerraIndex also supports 9.0.0/8.0.0 etc. 116 + 117 +(% element-id="1752" %) 118 +~==> nle Do you want to mention these old versions? 92 92 )))|(% element-id="1751" %) 93 93 (% 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" %) 94 94 (% 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 (), ... ... @@ -467,7 +467,7 @@ 467 467 468 468 469 469 (% element-id="1366" %) 470 -Therefor we call a Webserice for ValidCredentials Check: 497 +Therefore we call a Webserice for ValidCredentials Check: 471 471 472 472 473 473 (% class="table-hover" element-id="1363" %) ... ... @@ -686,12 +686,12 @@ 686 686 == (% element-id="1202" %)Solution/Design(%%) == 687 687 688 688 (% element-id="1201" %) 689 -For this we create a Webserice for CreateOrder to create the order in the lab system. 716 +For this we create a Webservice for CreateOrder to create the order in the lab system. 690 690 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. 691 691 Depending on the user's choice at the laboratory, to support this or not, TerraIndex calls the ApproveOrder or the CancelOrder. 692 692 693 693 (% element-id="0" %) 694 -For default we assume that we cannot do this yet, and TerraIndex sends needsApprova lIsSupported = false. If this becomes true in the future, the Lab can indicate whether or not it is necessary in the NeedsApprove field.721 +For default we assume that we cannot do this yet, and TerraIndex sends needsApprovaIsSupported = false. If this becomes true in the future, the Lab can indicate whether or not it is necessary in the NeedsApprove field. 695 695 696 696 697 697 (% class="table-hover" element-id="1195" %) ... ... @@ -1233,11 +1233,20 @@ 1233 1233 = (% element-id="653" %)Get Order status and Results(%%) = 1234 1234 1235 1235 (% element-id="652" %) 1236 -== (% element-id="651" %)Soluion/Design(%%) == 1263 +== (% element-id="651" %)Solution/Design(%%) == 1237 1237 1238 1238 (% element-id="650" %) 1239 1239 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. 1240 1240 1268 + 1269 +(% class="box infomessage" element-id="650" %) 1270 +((( 1271 +**Order status** we support as minimal: 1272 +3 = Reportnumber is known, no results yet, but it's the official report certificate number. This is optional to send. 1273 +4 = Conceptual, temporary results avaiable, but not final yet. This is optional to send. 1274 +5 = Final results are available. This is required to send. 1275 +))) 1276 + 1241 1241 (% class="table-hover" element-id="647" %) 1242 1242 (% 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 1243 1243 (% 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), ... ... @@ -1244,7 +1244,7 @@ 1244 1244 WebservicePassword (string), 1245 1245 CustomerUsername (string)|(% element-id="627" %)We want to skip the Password of the customer, and we introduce the WebserviceUsername + WebservicePassword.|(% element-id="626" %) 1246 1246 (% 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" %) 1247 -(% element-id="611" %)|(% element-id="610" %)3|(% element-id="609" %) |(% element-id="607" %)<=|(% element-id="606" %)Sends back the list of customers withthelastChangedTimestamp|(% element-id="605" %)ResultCode (),1283 +(% element-id="611" %)|(% element-id="610" %)3|(% element-id="609" %) |(% element-id="607" %)<=|(% element-id="606" %)Sends back the list of customers to check for orderStatuses|(% element-id="605" %)ResultCode (), 1248 1248 ErrorMessage (string), 1249 1249 List<customer> , Customer: 1250 1250 CustomerCode (string), ... ... @@ -1360,6 +1360,204 @@ 1360 1360 10 = PDFNotAvailable 1361 1361 (% 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" %) 1362 1362 1399 +(% class="wikigeneratedid" element-id="357" %) 1400 +== Request example Order Status == 1401 + 1402 +public GetOrderStatusesCall.Response OrderStatuses(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, DateTime? timestampSince) 1403 + { 1404 + GetOrderStatusesCall.Response set = new GetOrderStatusesCall.Response(); 1405 + string responseMessage = null; 1406 + 1407 + if (timestampSince == null) timestampSince = DateTime.Now.AddHours(-3); ~/~/Now, minus 3 hours 1408 + var formattedTimestamp = System.Xml.XmlConvert.ToString((DateTime)timestampSince, System.Xml.XmlDateTimeSerializationMode.RoundtripKind); 1409 + 1410 + try 1411 + { 1412 + var content = new FormUrlEncodedContent(new[] 1413 + { 1414 + new KeyValuePair<string, string>("userName", WebserviceUsername), 1415 + new KeyValuePair<string, string>("password", WebservicePassword), 1416 + new KeyValuePair<string, string>("customerUsername", CustomerUsername), 1417 + new KeyValuePair<string, string>("clientId", customerid), 1418 + new KeyValuePair<string, string>("lastModified", formattedTimestamp), 1419 + }); 1420 + 1421 + HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetOrderStatuses", content).GetAwaiter().GetResult(); 1422 + responseMessage = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); 1423 + response.EnsureSuccessStatusCode(); 1424 + 1425 + if (string.IsNullOrEmpty(responseMessage)) 1426 + { 1427 + throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /GetOrderStatuses" + "]"); 1428 + } 1429 + using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 1430 + { 1431 + XmlSerializer serializer = new XmlSerializer(typeof(GetOrderStatusesCall.Response)); 1432 + set = (GetOrderStatusesCall.Response)serializer.Deserialize(ms); 1433 + } 1434 + 1435 + } 1436 + catch (Exception ex) 1437 + { 1438 + #region handle exception 1439 + 1440 + set.Status = new BusinessEntities.LabRestService.GetOrderStatusesCall.ResponseStatus(); 1441 + set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 1442 + set.Status.ErrorMessage = "Exception occurred in GetOrderStatuses (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.ToString(); 1443 + 1444 + ex.Data.Add("Response", responseMessage); 1445 + ex.Data.Add("WebserviceUsername", WebserviceUsername); 1446 + ex.Data.Add("WebservicePassword", WebservicePassword); 1447 + ex.Data.Add("CustomerUsername", CustomerUsername); 1448 + ex.Data.Add("customerid", customerid); 1449 + ex.Data.Add("lastModified", formattedTimestamp); 1450 + ex.Data.Add("Result", set); 1451 + 1452 + throw; 1453 + #endregion 1454 + } 1455 + 1456 + return set; 1457 + } 1458 + 1459 +== Response Status XML Example == 1460 + 1461 + <?xml version="1.0" encoding="UTF-8" standalone="no"?> 1462 + <Response> 1463 + <Orders> 1464 + <Order> 1465 + <OrderStatus>Reported</OrderStatus> 1466 + <SIKBOrderId></SIKBOrderId> 1467 + <SIKBOrderStatus>5</SIKBOrderStatus> 1468 + <OrderId>4855422</OrderId> 1469 + <RapportNummer>12193838</RapportNummer> 1470 + <IsDelayed>False</IsDelayed> 1471 + <ExpectedOn>09/10/2015 17:15:00</ExpectedOn> 1472 + </Order> 1473 + <Order> 1474 + <OrderStatus>New</OrderStatus> 1475 + <SIKBOrderId></SIKBOrderId> 1476 + <SIKBOrderStatus>3</SIKBOrderStatus> 1477 + <OrderId>7106525</OrderId> 1478 + <RapportNummer>02808304-0749-41ae-96eb-d62b0365ebe4</RapportNummer> 1479 + <IsDelayed>False</IsDelayed> 1480 + <ExpectedOn></ExpectedOn> 1481 + </Order> 1482 + <Order> 1483 + <OrderStatus>New</OrderStatus> 1484 + <SIKBOrderId></SIKBOrderId> 1485 + <SIKBOrderStatus>3</SIKBOrderStatus> 1486 + <OrderId>7108954</OrderId> 1487 + <RapportNummer>10776137-ef99-4947-9a6a-9a3b32cd2dec</RapportNummer> 1488 + <IsDelayed>False</IsDelayed> 1489 + <ExpectedOn></ExpectedOn> 1490 + </Order> 1491 + <Order> 1492 + <OrderStatus>New</OrderStatus> 1493 + <SIKBOrderId></SIKBOrderId> 1494 + <SIKBOrderStatus>3</SIKBOrderStatus> 1495 + <OrderId>7110401</OrderId> 1496 + <RapportNummer>7881575c-bee2-409f-b304-9e472e7ac702</RapportNummer> 1497 + <IsDelayed>False</IsDelayed> 1498 + <ExpectedOn>11/10/2018 00:00:00</ExpectedOn> 1499 + </Order> 1500 + </Orders> 1501 + <Status> 1502 + <StatusCode>1</StatusCode> 1503 + <StatusCodeDescription>OK</StatusCodeDescription> 1504 + <AtmisErrorCode>0</AtmisErrorCode> 1505 + <ErrorMessage></ErrorMessage> 1506 + </Status> 1507 + </Response> 1508 + 1509 + 1510 +== Request example Order XML == 1511 + 1512 + 1513 +public GetOrderResultsCall.Response GetOrderResults(string WebserviceUsername, string WebservicePassword, string CustomerUsername, string customerid, string orderid, string sikbVersion) 1514 + { 1515 + GetOrderResultsCall.Response set = new GetOrderResultsCall.Response(); 1516 + string responseMessage = null; 1517 + try 1518 + { 1519 + bool useZipstream = true; 1520 + var content = new FormUrlEncodedContent(new[] 1521 + { 1522 + new KeyValuePair<string, string>("userName", WebserviceUsername), 1523 + new KeyValuePair<string, string>("password", WebservicePassword), 1524 + new KeyValuePair<string, string>("customerUsername", CustomerUsername), 1525 + new KeyValuePair<string, string>("clientId", customerid), 1526 + new KeyValuePair<string, string>("orderId", orderid), 1527 + new KeyValuePair<string, string>("sikbVersion", sikbVersion), 1528 + new KeyValuePair<string, string>("useZip", useZipstream.ToString() ), 1529 + }); 1530 + 1531 + HttpResponseMessage response = _HttpClient.PostAsync(_HttpClient.BaseAddress + "/GetOrderResults", content).GetAwaiter().GetResult(); 1532 + responseMessage = response.Content.ReadAsStringAsync().GetAwaiter().GetResult(); 1533 + response.EnsureSuccessStatusCode(); 1534 + 1535 + if (string.IsNullOrEmpty(responseMessage)) 1536 + { 1537 + throw new Exception("Empty response from: [" + _HttpClient.BaseAddress + " /GetOrderResults" + "]"); 1538 + } 1539 + using (var ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(responseMessage~)~)~) 1540 + { 1541 + XmlSerializer serializer = new XmlSerializer(typeof(GetOrderResultsCall.Response)); 1542 + set = (GetOrderResultsCall.Response)serializer.Deserialize(ms); 1543 + } 1544 + 1545 + if (useZipstream && !string.IsNullOrEmpty(set.FileContent)) 1546 + { 1547 + ~/~/convert from base64 string back to normal 1548 + ~/~/first check for real Base64, by checking there is no 'xml' in it 1549 + ~/~/If encoded, it wont contain either of the root XML tags of SIKB 1550 + if (!set.FileContent.Contains("FeatureCollectionIMSIKB0101") && !set.FileContent.Contains("labresultaat")) 1551 + { 1552 + set.FileContent = ZipStreamHelper.DecompressBase64StringToString(set.FileContent); 1553 + } 1554 + } 1555 + 1556 + } 1557 + catch (Exception ex) 1558 + { 1559 + #region handle exception 1560 + 1561 + set.Status = new BusinessEntities.LabRestService.GetOrderResultsCall.ResponseStatus(); 1562 + set.Status.StatusCode = ((int)ResultCodes.GeneralError).ToString(); 1563 + set.Status.ErrorMessage = "Exception occurred in GetOrderResults (username: " + WebserviceUsername + ", password: " + WebservicePassword + ") with message: " + ex.ToString(); 1564 + 1565 + ex.Data.Add("Response", responseMessage); 1566 + ex.Data.Add("WebserviceUsername", WebserviceUsername); 1567 + ex.Data.Add("WebservicePassword", WebservicePassword); 1568 + ex.Data.Add("CustomerUsername", CustomerUsername); 1569 + ex.Data.Add("sikbVersion", sikbVersion); 1570 + ex.Data.Add("customerid", customerid); 1571 + ex.Data.Add("orderId", orderid); 1572 + ex.Data.Add("Result", set); 1573 + 1574 + throw; 1575 + #endregion 1576 + } 1577 + 1578 + return set; 1579 + 1580 + 1581 +== Response Order XML Example == 1582 + 1583 + 1584 +<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1585 + <Response> 1586 + <FileContent>DhVn3Q1AA==</FileContent> ~/~/BASE64 Zip Stream, SIKB0101 labresults xml file 1587 + <Status> 1588 + <StatusCode>1</StatusCode> 1589 + <StatusCodeDescription>OK</StatusCodeDescription> 1590 + <AtmisErrorCode>0</AtmisErrorCode> 1591 + <ErrorMessage></ErrorMessage> 1592 + </Status> 1593 + </Response> 1594 + 1595 + 1596 + 1363 1363 (% element-id="357" %) 1364 1364 = (% element-id="356" %)Customer wants to see real time information about the status in the interface(%%) = 1365 1365
- 1712326445096-102.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.RobinHuisman - Size
-
... ... @@ -1,0 +1,1 @@ 1 +20.5 KB - Content
- 1712326465681-980.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.RobinHuisman - Size
-
... ... @@ -1,0 +1,1 @@ 1 +20.5 KB - Content
- 1712326492306-381.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.RobinHuisman - Size
-
... ... @@ -1,0 +1,1 @@ 1 +38.6 KB - Content
- 1712326520488-924.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.RobinHuisman - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.8 KB - Content
- Lab exchange.txt
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.RobinHuisman - Size
-
... ... @@ -1,0 +1,1 @@ 1 +2.2 KB - Content
-
... ... @@ -1,0 +1,50 @@ 1 +title Digital Lab exchange Process 2 + 3 +participant Lab 4 +participant TerraIndex 5 +participant TerraIndex_User 6 + 7 + 8 +==**Labdelivery data**== 9 +note over Lab,TerraIndex_User:TerraIndex retrieves the 'menu-card' so the user can order analysis. 10 +TerraIndex->Lab:Request the Client codes for a Customer 11 +Lab->TerraIndex:return the active Client codes 12 +TerraIndex->Lab:LabDelivery Data/File for a Customer Client Code 13 +Lab->TerraIndex:return the Labdelivery SIKB0101 File. 14 +TerraIndex->TerraIndex:Store and import into User database. 15 + 16 +==**Labassignment**== 17 +note over Lab,TerraIndex_User:TerraIndex sends the 'order' so the lab can process the samples. 18 +TerraIndex->TerraIndex_User:Show available Lab and Client codes 19 +TerraIndex_User->TerraIndex_User:Select Lab and Client code 20 +TerraIndex->TerraIndex_User:Show available Analysis Sets and Urgencies 21 +TerraIndex_User->TerraIndex_User:Select the samples 22 +TerraIndex_User->TerraIndex_User:Select the needed analysis sets 23 +TerraIndex_User->TerraIndex:Store/Save the labassignment 24 +TerraIndex_User->TerraIndex:Send to the lab 25 +TerraIndex->TerraIndex:Generate SIKB0101 Labassignment file 26 +TerraIndex->Lab:Send file to the Lab 27 +note over Lab,TerraIndex:Option A 28 +Lab->TerraIndex:Acknowledge a success received 29 +TerraIndex->TerraIndex:Save status 30 +TerraIndex->TerraIndex_User:Show status and prevent further editing 31 +note over Lab,TerraIndex:Option B 32 +Lab->TerraIndex:Return Order price PDF 33 +TerraIndex->TerraIndex_User:Show Price and PDF 34 +TerraIndex_User->TerraIndex:Approve Order 35 +TerraIndex->Lab:Approve Order 36 +Lab->TerraIndex:Acknowledge a success received 37 +TerraIndex->TerraIndex:Save status 38 +TerraIndex->TerraIndex_User:Show status and prevent further editing 39 + 40 +==**Labresults**== 41 +note over Lab,TerraIndex_User:TerraIndex retrieves the 'results' so the user can order report. 42 +TerraIndex->Lab:Requests the Changed assignments since last asking 43 +Lab->TerraIndex:return the changed orders with status 44 +TerraIndex->Lab:Request the results of a Ready order 45 +Lab->TerraIndex:return the Analysisresults SIKB0101 File. 46 +TerraIndex->TerraIndex:Store and import into User database. 47 +TerraIndex->TerraIndex_User: 48 +TerraIndex_User->TerraIndex_User:Asessments and Report results 49 + 50 +