Skip to content

Commit f86ca2d

Browse files
chore: delete creation of patientDT
1 parent 869dd79 commit f86ca2d

File tree

1 file changed

+14
-144
lines changed

1 file changed

+14
-144
lines changed

data/flows.json

Lines changed: 14 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,8 +1474,8 @@
14741474
"initialize": "",
14751475
"finalize": "",
14761476
"libs": [],
1477-
"x": 2830,
1478-
"y": 860,
1477+
"x": 2870,
1478+
"y": 820,
14791479
"wires": [
14801480
[
14811481
"62c28667af053fe0"
@@ -1501,7 +1501,7 @@
15011501
"once": false,
15021502
"onceDelay": 0.1,
15031503
"topic": "",
1504-
"payload": "{\"type\": 5, \"person_id\": \"hp10\", \"person_role\": \"health\", \"room_id\": \"room10\"} ",
1504+
"payload": "{\"type\": 5, \"person_id\": \"ProvaPatient\", \"person_role\": \"patient\", \"room_id\": \"Room-2\"} ",
15051505
"payloadType": "str",
15061506
"x": 110,
15071507
"y": 460,
@@ -1540,110 +1540,6 @@
15401540
]
15411541
]
15421542
},
1543-
{
1544-
"id": "d7aeec33f6a4d5e0",
1545-
"type": "switch",
1546-
"z": "09012e75c72a4968",
1547-
"name": "roleSwitch",
1548-
"property": "role",
1549-
"propertyType": "msg",
1550-
"rules": [
1551-
{
1552-
"t": "eq",
1553-
"v": "health",
1554-
"vt": "str"
1555-
},
1556-
{
1557-
"t": "eq",
1558-
"v": "patient",
1559-
"vt": "str"
1560-
}
1561-
],
1562-
"checkall": "true",
1563-
"repair": false,
1564-
"outputs": 2,
1565-
"x": 1310,
1566-
"y": 880,
1567-
"wires": [
1568-
[
1569-
"091e1425012342f8"
1570-
],
1571-
[
1572-
"d119d9c78f4ac103"
1573-
]
1574-
]
1575-
},
1576-
{
1577-
"id": "c0697d7b4441af53",
1578-
"type": "function",
1579-
"z": "09012e75c72a4968",
1580-
"name": "createPatientDT",
1581-
"func": "let patientModel = \"dtmi:io:github:smartoperatingblock:Patient;1\"\nmsg.url = \"https://digital-twin-layer.api.neu.digitaltwins.azure.net/digitaltwins/\" + msg.person_id + \"?api-version=2023-02-27-preview\"\nmsg.method = \"put\"\n\nmsg.payload = {\n \"$metadata\": {\n \"$model\": patientModel\n },\n \"is_on_operating_table\": false\n}\n\nreturn msg\n",
1582-
"outputs": 1,
1583-
"noerr": 0,
1584-
"initialize": "",
1585-
"finalize": "",
1586-
"libs": [],
1587-
"x": 2280,
1588-
"y": 940,
1589-
"wires": [
1590-
[
1591-
"6e28ea76ba198ea8"
1592-
]
1593-
]
1594-
},
1595-
{
1596-
"id": "d119d9c78f4ac103",
1597-
"type": "function",
1598-
"z": "09012e75c72a4968",
1599-
"name": "checkIfPatientDTExitsts",
1600-
"func": "msg.url = \"https://digital-twin-layer.api.neu.digitaltwins.azure.net/digitaltwins/\" + msg.person_id + \"?api-version=2023-02-27-preview\"\nmsg.method = \"get\"\n\nreturn msg",
1601-
"outputs": 1,
1602-
"noerr": 0,
1603-
"initialize": "",
1604-
"finalize": "",
1605-
"libs": [],
1606-
"x": 1550,
1607-
"y": 920,
1608-
"wires": [
1609-
[
1610-
"c24fc68b0de6902c"
1611-
]
1612-
]
1613-
},
1614-
{
1615-
"id": "7fce2ecffbba5be0",
1616-
"type": "switch",
1617-
"z": "09012e75c72a4968",
1618-
"name": "StatusCodeSwitch",
1619-
"property": "statusCode",
1620-
"propertyType": "msg",
1621-
"rules": [
1622-
{
1623-
"t": "eq",
1624-
"v": "200",
1625-
"vt": "num"
1626-
},
1627-
{
1628-
"t": "eq",
1629-
"v": "404",
1630-
"vt": "num"
1631-
}
1632-
],
1633-
"checkall": "true",
1634-
"repair": false,
1635-
"outputs": 2,
1636-
"x": 2070,
1637-
"y": 920,
1638-
"wires": [
1639-
[
1640-
"208b6e44f1f2d442"
1641-
],
1642-
[
1643-
"c0697d7b4441af53"
1644-
]
1645-
]
1646-
},
16471543
{
16481544
"id": "7810c6d0751cfd37",
16491545
"type": "switch",
@@ -1669,7 +1565,7 @@
16691565
"b7d27c682271db4a"
16701566
],
16711567
[
1672-
"d7aeec33f6a4d5e0"
1568+
"091e1425012342f8"
16731569
]
16741570
]
16751571
},
@@ -1705,32 +1601,6 @@
17051601
]
17061602
]
17071603
},
1708-
{
1709-
"id": "c24fc68b0de6902c",
1710-
"type": "subflow:70865c1f352e8a0c",
1711-
"z": "09012e75c72a4968",
1712-
"name": "",
1713-
"x": 1810,
1714-
"y": 920,
1715-
"wires": [
1716-
[
1717-
"7fce2ecffbba5be0"
1718-
]
1719-
]
1720-
},
1721-
{
1722-
"id": "6e28ea76ba198ea8",
1723-
"type": "subflow:70865c1f352e8a0c",
1724-
"z": "09012e75c72a4968",
1725-
"name": "",
1726-
"x": 2510,
1727-
"y": 940,
1728-
"wires": [
1729-
[
1730-
"208b6e44f1f2d442"
1731-
]
1732-
]
1733-
},
17341604
{
17351605
"id": "dfc0c3d254b99e87",
17361606
"type": "subflow:70865c1f352e8a0c",
@@ -1841,7 +1711,7 @@
18411711
"finalize": "",
18421712
"libs": [],
18431713
"x": 2250,
1844-
"y": 860,
1714+
"y": 940,
18451715
"wires": [
18461716
[
18471717
"c19c574b2b54b343"
@@ -1859,8 +1729,8 @@
18591729
"initialize": "",
18601730
"finalize": "",
18611731
"libs": [],
1862-
"x": 1530,
1863-
"y": 820,
1732+
"x": 1330,
1733+
"y": 880,
18641734
"wires": [
18651735
[
18661736
"f601941828d90ad1"
@@ -1872,8 +1742,8 @@
18721742
"type": "subflow:70865c1f352e8a0c",
18731743
"z": "09012e75c72a4968",
18741744
"name": "",
1875-
"x": 1730,
1876-
"y": 820,
1745+
"x": 1530,
1746+
"y": 880,
18771747
"wires": [
18781748
[
18791749
"7abff071a8097e2f"
@@ -1886,7 +1756,7 @@
18861756
"z": "09012e75c72a4968",
18871757
"name": "",
18881758
"x": 2550,
1889-
"y": 820,
1759+
"y": 860,
18901760
"wires": [
18911761
[
18921762
"208b6e44f1f2d442"
@@ -1898,8 +1768,8 @@
18981768
"type": "switch",
18991769
"z": "09012e75c72a4968",
19001770
"name": "CurrentRoomExistsSwitch",
1901-
"property": "currentRoom",
1902-
"propertyType": "msg",
1771+
"property": "msg.payload[\"value\"][0][\"$targetId\"]",
1772+
"propertyType": "jsonata",
19031773
"rules": [
19041774
{
19051775
"t": "null"
@@ -1911,8 +1781,8 @@
19111781
"checkall": "true",
19121782
"repair": false,
19131783
"outputs": 2,
1914-
"x": 1950,
1915-
"y": 820,
1784+
"x": 1830,
1785+
"y": 880,
19161786
"wires": [
19171787
[
19181788
"208b6e44f1f2d442"

0 commit comments

Comments
 (0)