|
1474 | 1474 | "initialize": "", |
1475 | 1475 | "finalize": "", |
1476 | 1476 | "libs": [], |
1477 | | - "x": 2830, |
1478 | | - "y": 860, |
| 1477 | + "x": 2870, |
| 1478 | + "y": 820, |
1479 | 1479 | "wires": [ |
1480 | 1480 | [ |
1481 | 1481 | "62c28667af053fe0" |
|
1501 | 1501 | "once": false, |
1502 | 1502 | "onceDelay": 0.1, |
1503 | 1503 | "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\"} ", |
1505 | 1505 | "payloadType": "str", |
1506 | 1506 | "x": 110, |
1507 | 1507 | "y": 460, |
|
1540 | 1540 | ] |
1541 | 1541 | ] |
1542 | 1542 | }, |
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 | | - }, |
1647 | 1543 | { |
1648 | 1544 | "id": "7810c6d0751cfd37", |
1649 | 1545 | "type": "switch", |
|
1669 | 1565 | "b7d27c682271db4a" |
1670 | 1566 | ], |
1671 | 1567 | [ |
1672 | | - "d7aeec33f6a4d5e0" |
| 1568 | + "091e1425012342f8" |
1673 | 1569 | ] |
1674 | 1570 | ] |
1675 | 1571 | }, |
|
1705 | 1601 | ] |
1706 | 1602 | ] |
1707 | 1603 | }, |
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 | | - }, |
1734 | 1604 | { |
1735 | 1605 | "id": "dfc0c3d254b99e87", |
1736 | 1606 | "type": "subflow:70865c1f352e8a0c", |
|
1841 | 1711 | "finalize": "", |
1842 | 1712 | "libs": [], |
1843 | 1713 | "x": 2250, |
1844 | | - "y": 860, |
| 1714 | + "y": 940, |
1845 | 1715 | "wires": [ |
1846 | 1716 | [ |
1847 | 1717 | "c19c574b2b54b343" |
|
1859 | 1729 | "initialize": "", |
1860 | 1730 | "finalize": "", |
1861 | 1731 | "libs": [], |
1862 | | - "x": 1530, |
1863 | | - "y": 820, |
| 1732 | + "x": 1330, |
| 1733 | + "y": 880, |
1864 | 1734 | "wires": [ |
1865 | 1735 | [ |
1866 | 1736 | "f601941828d90ad1" |
|
1872 | 1742 | "type": "subflow:70865c1f352e8a0c", |
1873 | 1743 | "z": "09012e75c72a4968", |
1874 | 1744 | "name": "", |
1875 | | - "x": 1730, |
1876 | | - "y": 820, |
| 1745 | + "x": 1530, |
| 1746 | + "y": 880, |
1877 | 1747 | "wires": [ |
1878 | 1748 | [ |
1879 | 1749 | "7abff071a8097e2f" |
|
1886 | 1756 | "z": "09012e75c72a4968", |
1887 | 1757 | "name": "", |
1888 | 1758 | "x": 2550, |
1889 | | - "y": 820, |
| 1759 | + "y": 860, |
1890 | 1760 | "wires": [ |
1891 | 1761 | [ |
1892 | 1762 | "208b6e44f1f2d442" |
|
1898 | 1768 | "type": "switch", |
1899 | 1769 | "z": "09012e75c72a4968", |
1900 | 1770 | "name": "CurrentRoomExistsSwitch", |
1901 | | - "property": "currentRoom", |
1902 | | - "propertyType": "msg", |
| 1771 | + "property": "msg.payload[\"value\"][0][\"$targetId\"]", |
| 1772 | + "propertyType": "jsonata", |
1903 | 1773 | "rules": [ |
1904 | 1774 | { |
1905 | 1775 | "t": "null" |
|
1911 | 1781 | "checkall": "true", |
1912 | 1782 | "repair": false, |
1913 | 1783 | "outputs": 2, |
1914 | | - "x": 1950, |
1915 | | - "y": 820, |
| 1784 | + "x": 1830, |
| 1785 | + "y": 880, |
1916 | 1786 | "wires": [ |
1917 | 1787 | [ |
1918 | 1788 | "208b6e44f1f2d442" |
|
0 commit comments