{
  "version": "1.0.0",
  "exportedAt": "2026-07-16T10:19:27.882Z",
  "workflow": {
    "name": "Cerner Patient Lookup & Search",
    "description": "Reads a patient by ID and searches by name, birthdate, or identifier in Cerner FHIR \u2014 including the expected error cases (not found, bad request, unauthorized)."
  },
  "flow": {
    "tab": {
      "id": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
      "type": "tab",
      "label": "Read/Search FHIR Cerner EHR",
      "disabled": false,
      "info": ""
    },
    "nodes": [
      {
        "id": "aa1e37d9695a6fd2",
        "type": "group",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "style": {
          "stroke": "#999999",
          "stroke-opacity": "1",
          "fill": "none",
          "fill-opacity": "1",
          "label": true,
          "label-position": "nw",
          "color": "#a4a4a4"
        },
        "nodes": [
          "956c16a52be5fa3a",
          "76718dfbb3176c62",
          "40519e4c6064175d",
          "bb9b29970dcca505",
          "e9f43b348b7f1ab6",
          "15280c3699b78651",
          "dd767d5b78d1e5b6",
          "a0ac9cf6d9230992",
          "b0c6eedbcd90dbce",
          "cb6b14c28fc782a8",
          "b85cc74fbd5a4d6c",
          "4eca1d5ca40c9414",
          "f9e6cccd7f515d75",
          "6eb5e5dd0d0e5f7d",
          "bf2b399a02450522",
          "5d6f8fa42bb6171b",
          "6b2abc0762c80226",
          "5bce7923b7f529c4",
          "4a3423dd2ed521a4",
          "cff84fbc7384702b"
        ],
        "x": 54,
        "y": 19,
        "w": 1302,
        "h": 422
      },
      {
        "id": "52be4c87fc1cece3",
        "type": "group",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "style": {
          "stroke": "#999999",
          "stroke-opacity": "1",
          "fill": "none",
          "fill-opacity": "1",
          "label": true,
          "label-position": "nw",
          "color": "#a4a4a4"
        },
        "nodes": [
          "41f2f6c6d8de1331",
          "a0edd105457f486b",
          "11822637fc9b3eb7",
          "f6f973fcb2a12b2b",
          "8fbab6b7bc99630a",
          "0651ee6352c5ae74",
          "ab1aa34d3dc7e244",
          "faa9ce147ec58484",
          "54e1b209debd3623",
          "1e1344b901a4905c",
          "6af0b3b9d347f07c",
          "9600274757355159",
          "d9a5ce7957998cc5",
          "ce0ed92b56f919d4",
          "06408331a2c6154d",
          "aec12d76223c1275",
          "f644a1e19f32264b",
          "7d23db6a93726889",
          "194fe4845deff52a",
          "9df6b058a72e6890",
          "349da573b0836eca",
          "9d39c76f85bef027",
          "86eedef24d67b969",
          "001b231b1b96da47",
          "17a431dde1a92d5d"
        ],
        "x": 54,
        "y": 479,
        "w": 1392,
        "h": 482
      },
      {
        "id": "956c16a52be5fa3a",
        "type": "comment",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\ud83d\udcd6 READ TEST WORKFLOWS",
        "info": "Individual workflows for Patient Read operations",
        "x": 240,
        "y": 60,
        "wires": []
      },
      {
        "id": "76718dfbb3176c62",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u2705 READ TEST 1: Valid Patient",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"patientId\":\"TEST-PATIENT-ID-001\"}",
        "payloadType": "json",
        "x": 230,
        "y": 100,
        "wires": [
          [
            "40519e4c6064175d"
          ]
        ]
      },
      {
        "id": "40519e4c6064175d",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Get Token",
        "integrationId": "",
        "integrationMetadata": {
          "ehr": "athena",
          "type": "backend",
          "scopes": "system/Patient.rs"
        },
        "customScopes": "",
        "outputFormat": "token",
        "x": 510,
        "y": 100,
        "wires": [
          [
            "bb9b29970dcca505"
          ]
        ]
      },
      {
        "id": "bb9b29970dcca505",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Build HTTP Request",
        "func": "// Patient: Test Patient\n// ID: TEST-PATIENT-ID-001\n// Expected: 200 OK with patient resource\n\nconst patientId = msg.payload.patientId;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient/${patientId}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 740,
        "y": 100,
        "wires": [
          [
            "e9f43b348b7f1ab6"
          ]
        ]
      },
      {
        "id": "e9f43b348b7f1ab6",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "GET Patient",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 950,
        "y": 100,
        "wires": [
          [
            "15280c3699b78651"
          ]
        ]
      },
      {
        "id": "15280c3699b78651",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u2705 Valid Patient Result",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1210,
        "y": 100,
        "wires": []
      },
      {
        "id": "dd767d5b78d1e5b6",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u274c READ TEST 2: Non-Existent",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"patientId\":\"NonExistentID999999\"}",
        "payloadType": "json",
        "x": 230,
        "y": 200,
        "wires": [
          [
            "a0ac9cf6d9230992"
          ]
        ]
      },
      {
        "id": "a0ac9cf6d9230992",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Get Token",
        "outputFormat": "token",
        "x": 510,
        "y": 200,
        "wires": [
          [
            "b0c6eedbcd90dbce"
          ]
        ]
      },
      {
        "id": "b0c6eedbcd90dbce",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Build HTTP Request",
        "func": "// Non-existent patient ID\n// Expected: 404 Not Found\n\nconst patientId = msg.payload.patientId;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient/${patientId}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 740,
        "y": 200,
        "wires": [
          [
            "cb6b14c28fc782a8"
          ]
        ]
      },
      {
        "id": "cb6b14c28fc782a8",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "GET Patient",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 950,
        "y": 200,
        "wires": [
          [
            "b85cc74fbd5a4d6c"
          ]
        ]
      },
      {
        "id": "b85cc74fbd5a4d6c",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u274c 404 Not Found",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1190,
        "y": 200,
        "wires": []
      },
      {
        "id": "4eca1d5ca40c9414",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u274c READ TEST 3: Invalid ID Format",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"patientId\":\"!@#$%^&*()\"}",
        "payloadType": "json",
        "x": 240,
        "y": 300,
        "wires": [
          [
            "f9e6cccd7f515d75"
          ]
        ]
      },
      {
        "id": "f9e6cccd7f515d75",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Get Token",
        "outputFormat": "token",
        "x": 520,
        "y": 300,
        "wires": [
          [
            "6eb5e5dd0d0e5f7d"
          ]
        ]
      },
      {
        "id": "6eb5e5dd0d0e5f7d",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Build HTTP Request",
        "func": "// Invalid ID format with special characters\n// Expected: 400 Bad Request or 404\n\nconst patientId = msg.payload.patientId;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient/${patientId}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 740,
        "y": 300,
        "wires": [
          [
            "bf2b399a02450522"
          ]
        ]
      },
      {
        "id": "bf2b399a02450522",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "GET Patient",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 950,
        "y": 300,
        "wires": [
          [
            "5d6f8fa42bb6171b"
          ]
        ]
      },
      {
        "id": "5d6f8fa42bb6171b",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u274c 400 Bad Request",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1200,
        "y": 300,
        "wires": []
      },
      {
        "id": "6b2abc0762c80226",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u274c READ TEST 4: No Auth",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"patientId\":\"TEST-PATIENT-ID-001\"}",
        "payloadType": "json",
        "x": 210,
        "y": 400,
        "wires": [
          [
            "5bce7923b7f529c4"
          ]
        ]
      },
      {
        "id": "5bce7923b7f529c4",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "Build HTTP Request (No Auth)",
        "func": "// Missing Authorization header\n// Expected: 401 Unauthorized\n\nconst patientId = msg.payload.patientId;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient/${patientId}`;\nmsg.headers = {\n    \"Accept\": \"application/fhir+json\"\n    // No Authorization header\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 510,
        "y": 400,
        "wires": [
          [
            "4a3423dd2ed521a4"
          ]
        ]
      },
      {
        "id": "4a3423dd2ed521a4",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "GET Patient",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 790,
        "y": 400,
        "wires": [
          [
            "cff84fbc7384702b"
          ]
        ]
      },
      {
        "id": "cff84fbc7384702b",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "aa1e37d9695a6fd2",
        "name": "\u274c 401 Unauthorized",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1060,
        "y": 400,
        "wires": []
      },
      {
        "id": "41f2f6c6d8de1331",
        "type": "comment",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\ud83d\udd0d SEARCH TEST WORKFLOWS",
        "info": "Individual workflows for Patient Search operations",
        "x": 230,
        "y": 520,
        "wires": []
      },
      {
        "id": "a0edd105457f486b",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u2705 SEARCH TEST 1: By Family Name",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"family\":\"Testperson\"}",
        "payloadType": "json",
        "x": 250,
        "y": 600,
        "wires": [
          [
            "11822637fc9b3eb7"
          ]
        ]
      },
      {
        "id": "11822637fc9b3eb7",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Get Token",
        "outputFormat": "token",
        "x": 530,
        "y": 600,
        "wires": [
          [
            "f6f973fcb2a12b2b"
          ]
        ]
      },
      {
        "id": "f6f973fcb2a12b2b",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Build HTTP Request",
        "func": "// Search for patients with family name \"Testperson\"\n// Patient: Test Patient\n// Expected: 200 OK with Bundle containing matching patients\n\nconst family = msg.payload.family;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient?family=${family}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 760,
        "y": 600,
        "wires": [
          [
            "8fbab6b7bc99630a"
          ]
        ]
      },
      {
        "id": "8fbab6b7bc99630a",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "GET Patients",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 1010,
        "y": 600,
        "wires": [
          [
            "0651ee6352c5ae74"
          ]
        ]
      },
      {
        "id": "0651ee6352c5ae74",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u2705 Family Search Result",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1270,
        "y": 600,
        "wires": []
      },
      {
        "id": "ab1aa34d3dc7e244",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u2705 SEARCH TEST 2: By Birthdate",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"birthdate\":\"2000-01-01\"}",
        "payloadType": "json",
        "x": 240,
        "y": 680,
        "wires": [
          [
            "faa9ce147ec58484"
          ]
        ]
      },
      {
        "id": "faa9ce147ec58484",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Get Token",
        "outputFormat": "token",
        "x": 530,
        "y": 680,
        "wires": [
          [
            "54e1b209debd3623"
          ]
        ]
      },
      {
        "id": "54e1b209debd3623",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Build HTTP Request",
        "func": "// Search for patients born on 2000-01-01\n// Patient: Test Patient (DOB: 2000-01-01)\n// Expected: 200 OK with Bundle containing matching patients\n\nconst birthdate = msg.payload.birthdate;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient?birthdate=${birthdate}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 760,
        "y": 680,
        "wires": [
          [
            "1e1344b901a4905c"
          ]
        ]
      },
      {
        "id": "1e1344b901a4905c",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "GET Patients",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 1010,
        "y": 680,
        "wires": [
          [
            "6af0b3b9d347f07c"
          ]
        ]
      },
      {
        "id": "6af0b3b9d347f07c",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u2705 Birthdate Search Result",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1280,
        "y": 680,
        "wires": []
      },
      {
        "id": "9600274757355159",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u2705 SEARCH TEST 3: By Identifier",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"identifier\":\"TEST-ID-0001\"}",
        "payloadType": "json",
        "x": 240,
        "y": 760,
        "wires": [
          [
            "d9a5ce7957998cc5"
          ]
        ]
      },
      {
        "id": "d9a5ce7957998cc5",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Get Token",
        "outputFormat": "token",
        "x": 530,
        "y": 760,
        "wires": [
          [
            "ce0ed92b56f919d4"
          ]
        ]
      },
      {
        "id": "ce0ed92b56f919d4",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Build HTTP Request",
        "func": "// Search for patient with EPIC identifier TEST-ID-0001\n// Patient: Test Patient (EPIC: TEST-ID-0001)\n// Expected: 200 OK with Bundle containing the patient\n\nconst identifier = msg.payload.identifier;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient?identifier=${identifier}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 760,
        "y": 760,
        "wires": [
          [
            "06408331a2c6154d"
          ]
        ]
      },
      {
        "id": "06408331a2c6154d",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "GET Patients",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 1010,
        "y": 760,
        "wires": [
          [
            "aec12d76223c1275"
          ]
        ]
      },
      {
        "id": "aec12d76223c1275",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u2705 Identifier Search Result",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1280,
        "y": 760,
        "wires": []
      },
      {
        "id": "f644a1e19f32264b",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u274c SEARCH TEST 4: Invalid Param",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"invalidParam\":\"test\"}",
        "payloadType": "json",
        "x": 240,
        "y": 840,
        "wires": [
          [
            "7d23db6a93726889"
          ]
        ]
      },
      {
        "id": "7d23db6a93726889",
        "type": "ec-auth-backend",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Get Token",
        "outputFormat": "token",
        "x": 530,
        "y": 840,
        "wires": [
          [
            "194fe4845deff52a"
          ]
        ]
      },
      {
        "id": "194fe4845deff52a",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Build HTTP Request",
        "func": "// Search with invalid parameter name\n// Expected: 400 Bad Request or empty Bundle\n\nconst invalidParam = msg.payload.invalidParam;\nconst token = msg.accessToken;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient?invalidParam=${invalidParam}`;\nmsg.headers = {\n    \"Authorization\": `Bearer ${token}`,\n    \"Accept\": \"application/fhir+json\"\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 760,
        "y": 840,
        "wires": [
          [
            "9df6b058a72e6890"
          ]
        ]
      },
      {
        "id": "9df6b058a72e6890",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "GET Patients",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 1010,
        "y": 840,
        "wires": [
          [
            "349da573b0836eca"
          ]
        ]
      },
      {
        "id": "349da573b0836eca",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u274c 400 Bad Request",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1260,
        "y": 840,
        "wires": []
      },
      {
        "id": "9d39c76f85bef027",
        "type": "inject",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u274c SEARCH TEST 5: No Auth",
        "props": [
          {
            "p": "payload"
          }
        ],
        "payload": "{\"family\":\"Testperson\"}",
        "payloadType": "json",
        "x": 220,
        "y": 920,
        "wires": [
          [
            "86eedef24d67b969"
          ]
        ]
      },
      {
        "id": "86eedef24d67b969",
        "type": "function",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "Build HTTP Request (No Auth)",
        "func": "// Search without Authorization header\n// Expected: 401 Unauthorized\n\nconst family = msg.payload.family;\n\nmsg.url = `https://fhir.cerner.com/r4/YOUR_TENANT/Patient?family=${family}`;\nmsg.headers = {\n    \"Accept\": \"application/fhir+json\"\n    // No Authorization header\n};\nmsg.method = \"GET\";\n\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "x": 690,
        "y": 920,
        "wires": [
          [
            "001b231b1b96da47"
          ]
        ]
      },
      {
        "id": "001b231b1b96da47",
        "type": "http request",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "GET Patients",
        "method": "use",
        "ret": "obj",
        "url": "",
        "x": 1010,
        "y": 920,
        "wires": [
          [
            "17a431dde1a92d5d"
          ]
        ]
      },
      {
        "id": "17a431dde1a92d5d",
        "type": "debug",
        "z": "workflow_949642c1-0039-4a4e-a71a-da2f222f736b",
        "g": "52be4c87fc1cece3",
        "name": "\u274c 401 Unauthorized",
        "active": true,
        "tosidebar": true,
        "console": false,
        "complete": "payload",
        "targetType": "msg",
        "x": 1260,
        "y": 920,
        "wires": []
      }
    ]
  },
  "requirements": [
    {
      "ehr": "athena",
      "type": "backend",
      "scopes": "system/Patient.rs"
    }
  ]
}