n8n-nodes-openmrs 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -358
- package/dist/nodes/OpenMrs/OpenMrs.node.js +145 -138
- package/dist/nodes/OpenMrs/OpenMrs.node.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,415 +1,139 @@
|
|
|
1
1
|
# n8n-nodes-openmrs
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/n8n-nodes-openmrs)
|
|
4
4
|
[](https://www.npmjs.com/package/n8n-nodes-openmrs)
|
|
5
|
-
[](
|
|
5
|
+
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
## What's New in v1.2.0
|
|
12
|
-
|
|
13
|
-
**Smart Patient Search** - No more memorizing UUIDs!
|
|
14
|
-
- Search by OpenMRS ID: `131280865`
|
|
15
|
-
- Search by Name: `Patricia Lewis` (partial matching)
|
|
16
|
-
- Search by Phone: `+254712345678`
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Features
|
|
21
|
-
|
|
22
|
-
### Intelligent Patient Lookup
|
|
23
|
-
|
|
24
|
-
Real-world clinics don't use UUIDs. Search patients the way healthcare workers actually do:
|
|
25
|
-
|
|
26
|
-
- **By Identifier** - OpenMRS ID, National ID, Facility Number
|
|
27
|
-
- **By Name** - First name, last name, or partial matches
|
|
28
|
-
- **By Phone** - Mobile number in any format
|
|
29
|
-
- **By UUID** - For system integrations
|
|
30
|
-
|
|
31
|
-
### Complete FHIR R4 Coverage
|
|
32
|
-
|
|
33
|
-
Access all essential clinical resources:
|
|
34
|
-
|
|
35
|
-
| Resource | What You Get | Common Use Cases |
|
|
36
|
-
|----------|-------------|------------------|
|
|
37
|
-
| **Patient** | Demographics, identifiers, contacts | Registration, identity verification |
|
|
38
|
-
| **Encounter** | Visits, admissions, consultations | Attendance tracking, visit history |
|
|
39
|
-
| **Observation** | Labs, vitals, diagnostic results | Trend analysis, clinical alerts |
|
|
40
|
-
| **Diagnostic Report** | Imaging, pathology reports | Disease progression tracking |
|
|
41
|
-
| **Condition** | Diagnoses, active problems | Differential diagnosis, comorbidities |
|
|
42
|
-
| **Medication Statement** | Current & past medications | Treatment history, drug interactions |
|
|
43
|
-
|
|
44
|
-
### Developer-Friendly
|
|
45
|
-
|
|
46
|
-
- **Simple Auth** - HTTP Basic Authentication
|
|
47
|
-
- **Pagination** - Handle large datasets efficiently
|
|
48
|
-
- **Error Handling** - Clear error messages and continue-on-fail support
|
|
49
|
-
- **Custom API Calls** - Direct access to any OpenMRS FHIR endpoint
|
|
50
|
-
|
|
51
|
-
### Built for Global Health
|
|
52
|
-
|
|
53
|
-
- Optimized for low-bandwidth environments
|
|
54
|
-
- Works with OpenMRS 2.x and 3.x
|
|
55
|
-
- Compatible with DHIS2 workflows
|
|
56
|
-
- Supports both cloud and on-premise deployments
|
|
7
|
+
n8n community node for [OpenMRS](https://openmrs.org) FHIR R4 API. Register patients, create encounters, search clinical records, and build interoperability.
|
|
8
|
+
[n8n](https://n8n.io/) is a fair-code licensed workflow automation platform.
|
|
57
9
|
|
|
58
10
|
---
|
|
59
11
|
|
|
60
12
|
## Installation
|
|
61
13
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
1. Open n8n
|
|
65
|
-
2. Go to **Settings** → **Community Nodes**
|
|
66
|
-
3. Click **Install a community node**
|
|
67
|
-
4. Enter: `n8n-nodes-openmrs`
|
|
68
|
-
5. Click **Install**
|
|
69
|
-
|
|
70
|
-
### Via npm
|
|
71
|
-
```bash
|
|
72
|
-
npm install n8n-nodes-openmrs
|
|
73
|
-
```
|
|
14
|
+
**Via n8n UI:** Search DHIS2 as verified node or simply go to Settings → Community Nodes → `n8n-nodes-dhis2`
|
|
74
15
|
|
|
75
|
-
|
|
16
|
+
**Via npm:**
|
|
76
17
|
```bash
|
|
77
|
-
|
|
78
|
-
cd n8n-nodes-openmrs
|
|
79
|
-
npm install
|
|
80
|
-
npm run build
|
|
81
|
-
npm link
|
|
18
|
+
npm install n8n-nodes-dhis2
|
|
82
19
|
```
|
|
83
20
|
|
|
84
21
|
---
|
|
85
22
|
|
|
86
|
-
##
|
|
23
|
+
## Credentials
|
|
87
24
|
|
|
88
|
-
|
|
25
|
+
| Field | Description |
|
|
26
|
+
|----------|-------------|
|
|
27
|
+
| Base URL | Your OpenMRS instance including `/openmrs` (e.g. `https://demo.openmrs.org/openmrs`) |
|
|
28
|
+
| Username | OpenMRS username |
|
|
29
|
+
| Password | OpenMRS password |
|
|
89
30
|
|
|
90
|
-
|
|
91
|
-
2. Search for **OpenMRS API**
|
|
92
|
-
3. Configure:
|
|
93
|
-
- **Base URL**: `https://demo.openmrs.org/openmrs` (include `/openmrs`)
|
|
94
|
-
- **Username**: `admin`
|
|
95
|
-
- **Password**: `Admin123`
|
|
96
|
-
4. Test & Save
|
|
97
|
-
|
|
98
|
-
### 2. Search Patient by OpenMRS ID
|
|
99
|
-
```
|
|
100
|
-
Add Node → OpenMRS
|
|
101
|
-
├─ Resource: Patient
|
|
102
|
-
├─ Operation: Search by Identifier
|
|
103
|
-
└─ Identifier: 131280865
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
**Result:** Complete patient record instantly
|
|
107
|
-
|
|
108
|
-
### 3. Find Patient by Name
|
|
109
|
-
```
|
|
110
|
-
Add Node → OpenMRS
|
|
111
|
-
├─ Resource: Patient
|
|
112
|
-
├─ Operation: Search by Name
|
|
113
|
-
└─ Name: Patricia
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**Result:** All patients with "Patricia" in their name
|
|
31
|
+
Demo: `https://demo.openmrs.org/openmrs` — username `admin`, password `Admin123`
|
|
117
32
|
|
|
118
33
|
---
|
|
119
34
|
|
|
120
|
-
##
|
|
121
|
-
|
|
122
|
-
### Example 1: Patient Search by ID (Real-World)
|
|
123
|
-
|
|
124
|
-
**Instead of this (nobody remembers):**
|
|
125
|
-
```
|
|
126
|
-
UUID: 7826f08a-0258-4fb1-ba69-2af192f392db
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**Do this:**
|
|
130
|
-
```
|
|
131
|
-
OpenMRS ID: 131280865
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**n8n Workflow:**
|
|
135
|
-
1. Add OpenMRS node
|
|
136
|
-
2. Resource: **Patient**
|
|
137
|
-
3. Operation: **Search by Identifier**
|
|
138
|
-
4. Identifier: `131280865`
|
|
139
|
-
5. Execute
|
|
35
|
+
## Resources & Operations
|
|
140
36
|
|
|
141
|
-
|
|
37
|
+
| Resource | Operations |
|
|
38
|
+
|----------------------|------------|
|
|
39
|
+
| Patient | Create, Get, Get Many, Search by Identifier, Search by Name, Search by Phone |
|
|
40
|
+
| Encounter | Create, Get, Get Many |
|
|
41
|
+
| Observation | Get, Get Many |
|
|
42
|
+
| Diagnostic Report | Get, Get Many |
|
|
43
|
+
| Condition | Get, Get Many |
|
|
44
|
+
| Medication Statement | Get, Get Many |
|
|
45
|
+
| Custom API Call | Any method, any FHIR endpoint |
|
|
142
46
|
|
|
143
47
|
---
|
|
144
48
|
|
|
145
|
-
|
|
146
|
-
```
|
|
147
|
-
1. Add OpenMRS node
|
|
148
|
-
2. Resource: Observation
|
|
149
|
-
3. Operation: Get Many
|
|
150
|
-
4. Patient UUID: 7826f08a-0258-4fb1-ba69-2af192f392db
|
|
151
|
-
5. Limit: 50
|
|
152
|
-
6. Execute
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
**Output:** Up to 50 most recent lab results with values, units, reference ranges
|
|
156
|
-
|
|
157
|
-
---
|
|
49
|
+
## Example: Register a Patient
|
|
158
50
|
|
|
159
|
-
### Example 3: Track Patient Visit History
|
|
160
51
|
```
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
52
|
+
Resource: Patient
|
|
53
|
+
Operation: Create
|
|
54
|
+
Payload:
|
|
55
|
+
{
|
|
56
|
+
"resourceType": "Patient",
|
|
57
|
+
"identifier": [{ "system": "http://openmrs.org/identifier", "value": "CASE-001" }],
|
|
58
|
+
"name": [{ "family": "Nkurunziza", "given": ["Brian"] }],
|
|
59
|
+
"gender": "male",
|
|
60
|
+
"birthDate": "1995-03-15",
|
|
61
|
+
"telecom": [{ "system": "phone", "value": "+250788123456" }]
|
|
62
|
+
}
|
|
167
63
|
```
|
|
168
64
|
|
|
169
|
-
|
|
65
|
+
Returns the created FHIR Patient resource including the assigned OpenMRS UUID.
|
|
170
66
|
|
|
171
67
|
---
|
|
172
68
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
Use the **Custom API Call** resource for advanced queries:
|
|
176
|
-
```
|
|
177
|
-
1. Add OpenMRS node
|
|
178
|
-
2. Resource: Custom API Call
|
|
179
|
-
3. HTTP Method: GET
|
|
180
|
-
4. Endpoint: /ws/fhir2/R4/Patient
|
|
181
|
-
5. Query Parameters:
|
|
182
|
-
- name: birthdate
|
|
183
|
-
- value: gt1990-01-01
|
|
184
|
-
6. Execute
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
**Output:** All patients born after January 1, 1990
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Real-World Use Cases
|
|
192
|
-
|
|
193
|
-
### Clinical Workflows
|
|
194
|
-
|
|
195
|
-
**Patient Admission Dashboard**
|
|
196
|
-
```
|
|
197
|
-
Webhook Trigger
|
|
198
|
-
→ OpenMRS: Search by OpenMRS ID
|
|
199
|
-
→ OpenMRS: Get Encounters (last 6 months)
|
|
200
|
-
→ OpenMRS: Get Observations (recent labs)
|
|
201
|
-
→ Code: Calculate risk scores
|
|
202
|
-
→ Display: Admission summary
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
**Lost-to-Follow-Up Recovery**
|
|
206
|
-
```
|
|
207
|
-
Schedule (weekly)
|
|
208
|
-
→ OpenMRS: Get All Patients on ART
|
|
209
|
-
→ Code: Filter last visit > 28 days
|
|
210
|
-
→ OpenMRS: Search by Phone
|
|
211
|
-
→ SMS: "Medication ready for pickup"
|
|
212
|
-
→ DHIS2: Update tracker
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
### Data Analytics
|
|
69
|
+
## Example: Create an Encounter
|
|
216
70
|
|
|
217
|
-
**Disease Surveillance**
|
|
218
71
|
```
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
72
|
+
Resource: Encounter
|
|
73
|
+
Operation: Create
|
|
74
|
+
Payload:
|
|
75
|
+
{
|
|
76
|
+
"resourceType": "Encounter",
|
|
77
|
+
"status": "finished",
|
|
78
|
+
"class": { "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", "code": "AMB" },
|
|
79
|
+
"subject": { "reference": "Patient/PATIENT_UUID" },
|
|
80
|
+
"period": { "start": "2026-06-02T08:00:00+00:00", "end": "2026-06-02T09:00:00+00:00" }
|
|
81
|
+
}
|
|
228
82
|
```
|
|
229
|
-
OpenMRS: Observation created
|
|
230
|
-
→ Calculate: Order time - Result time
|
|
231
|
-
→ IF > 48 hours
|
|
232
|
-
→ Alert lab manager
|
|
233
|
-
→ DHIS2: Post performance indicator
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
### Global Health
|
|
237
|
-
|
|
238
|
-
- HIV/TB treatment adherence tracking
|
|
239
|
-
- Maternal health visit reminders
|
|
240
|
-
- Vaccine defaulter identification
|
|
241
|
-
- Stockout prevention for ARVs
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## API Reference
|
|
246
|
-
|
|
247
|
-
### Supported Resources
|
|
248
|
-
|
|
249
|
-
- `Patient` - Demographics, identifiers
|
|
250
|
-
- `Encounter` - Visits, admissions
|
|
251
|
-
- `Observation` - Labs, vitals, diagnostics
|
|
252
|
-
- `Diagnostic Report` - Imaging, pathology
|
|
253
|
-
- `Condition` - Diagnoses, problems
|
|
254
|
-
- `Medication Statement` - Prescriptions, dispensing
|
|
255
|
-
- `Custom API Call` - Any FHIR endpoint
|
|
256
|
-
|
|
257
|
-
### Patient Operations
|
|
258
83
|
|
|
259
|
-
|
|
260
|
-
- **Search by Name** - Partial name matching
|
|
261
|
-
- **Search by Phone** - Phone number search
|
|
262
|
-
- **Get** - Retrieve by UUID
|
|
263
|
-
- **Get Many** - Retrieve all (paginated)
|
|
264
|
-
|
|
265
|
-
### Other Resource Operations
|
|
266
|
-
|
|
267
|
-
- **Get** - Retrieve single resource by UUID
|
|
268
|
-
- **Get Many** - Retrieve all for patient (paginated)
|
|
269
|
-
|
|
270
|
-
### Pagination
|
|
271
|
-
|
|
272
|
-
All `Get Many` and search operations support:
|
|
273
|
-
- **Return All**: `true/false`
|
|
274
|
-
- **Limit**: `1-100` (default: 50)
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## FHIR Endpoints Used
|
|
279
|
-
```
|
|
280
|
-
GET /ws/fhir2/R4/Patient?identifier={id}
|
|
281
|
-
GET /ws/fhir2/R4/Patient?name={name}
|
|
282
|
-
GET /ws/fhir2/R4/Patient?telecom={phone}
|
|
283
|
-
GET /ws/fhir2/R4/Patient/{uuid}
|
|
284
|
-
GET /ws/fhir2/R4/Encounter?patient={uuid}&_count=50
|
|
285
|
-
GET /ws/fhir2/R4/Observation?patient={uuid}&_count=50
|
|
286
|
-
GET /ws/fhir2/R4/DiagnosticReport?patient={uuid}&_count=50
|
|
287
|
-
GET /ws/fhir2/R4/Condition?patient={uuid}&_count=50
|
|
288
|
-
GET /ws/fhir2/R4/MedicationStatement?patient={uuid}&_count=50
|
|
289
|
-
```
|
|
84
|
+
Replace `PATIENT_UUID` with the UUID returned from Patient Create.
|
|
290
85
|
|
|
291
86
|
---
|
|
292
87
|
|
|
293
88
|
## Compatibility
|
|
294
89
|
|
|
295
|
-
- **
|
|
296
|
-
- **
|
|
297
|
-
- **Node.js
|
|
90
|
+
- **OpenMRS:** 2.3+ with FHIR2 module enabled
|
|
91
|
+
- **n8n:** 1.0+
|
|
92
|
+
- **Node.js:** 22+
|
|
298
93
|
|
|
299
94
|
---
|
|
300
95
|
|
|
301
|
-
##
|
|
302
|
-
|
|
303
|
-
### Node doesn't appear
|
|
304
|
-
```bash
|
|
305
|
-
# Check installation
|
|
306
|
-
npm list -g n8n-nodes-openmrs
|
|
307
|
-
|
|
308
|
-
# Clear cache
|
|
309
|
-
rm -rf ~/.n8n/cache
|
|
96
|
+
## API Reference
|
|
310
97
|
|
|
311
|
-
# Restart n8n
|
|
312
|
-
n8n start
|
|
313
98
|
```
|
|
99
|
+
POST /ws/fhir2/R4/Patient
|
|
100
|
+
GET /ws/fhir2/R4/Patient/{uuid}
|
|
101
|
+
GET /ws/fhir2/R4/Patient?identifier={id}
|
|
102
|
+
GET /ws/fhir2/R4/Patient?name={name}
|
|
103
|
+
GET /ws/fhir2/R4/Patient?telecom={phone}
|
|
314
104
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
- Verify credentials in OpenMRS
|
|
319
|
-
- Check FHIR2 module is enabled
|
|
105
|
+
POST /ws/fhir2/R4/Encounter
|
|
106
|
+
GET /ws/fhir2/R4/Encounter/{uuid}
|
|
107
|
+
GET /ws/fhir2/R4/Encounter?patient={uuid}&_count=50
|
|
320
108
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
- Verify FHIR2 module configuration
|
|
326
|
-
|
|
327
|
-
### Build errors (for developers)
|
|
328
|
-
```bash
|
|
329
|
-
# Clean rebuild
|
|
330
|
-
rm -rf node_modules dist
|
|
331
|
-
npm install
|
|
332
|
-
npm run build
|
|
109
|
+
GET /ws/fhir2/R4/Observation?patient={uuid}&_count=50
|
|
110
|
+
GET /ws/fhir2/R4/DiagnosticReport?patient={uuid}&_count=50
|
|
111
|
+
GET /ws/fhir2/R4/Condition?patient={uuid}&_count=50
|
|
112
|
+
GET /ws/fhir2/R4/MedicationStatement?patient={uuid}&_count=50
|
|
333
113
|
```
|
|
334
114
|
|
|
335
115
|
---
|
|
336
116
|
|
|
337
|
-
##
|
|
338
|
-
|
|
339
|
-
### Building
|
|
340
|
-
```bash
|
|
341
|
-
npm run build # Compile TypeScript
|
|
342
|
-
npm run dev # Watch mode
|
|
343
|
-
npm run lint # Check code quality
|
|
344
|
-
npm run lintfix # Auto-fix issues
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
### Testing Locally
|
|
348
|
-
```bash
|
|
349
|
-
# Build and link
|
|
350
|
-
npm run build
|
|
351
|
-
npm link
|
|
352
|
-
|
|
353
|
-
# Start n8n
|
|
354
|
-
n8n start
|
|
117
|
+
## Resources
|
|
355
118
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
# Bump version
|
|
363
|
-
npm version minor # 1.1.0 → 1.2.0
|
|
364
|
-
|
|
365
|
-
# Publish
|
|
366
|
-
npm publish
|
|
367
|
-
|
|
368
|
-
# Push to GitHub
|
|
369
|
-
git push origin main --tags
|
|
370
|
-
```
|
|
119
|
+
- [DHIS2 Documentation](https://docs.dhis2.org/)
|
|
120
|
+
- [DHIS2 Web API Guide](https://docs.dhis2.org/en/develop/using-the-api/dhis-core-version-master/introduction.html)
|
|
121
|
+
- [DHIS2 Demo Server](https://play.dhis2.org)
|
|
122
|
+
- [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/)
|
|
123
|
+
- [OpenMRS n8n Node](https://www.npmjs.com/package/n8n-nodes-openmrs) clinical data from OpenMRS
|
|
124
|
+
- [RapidPro n8n Node](https://www.npmjs.com/package/n8n-nodes-rapidpro) messaging workflows via RapidPro
|
|
371
125
|
|
|
372
126
|
---
|
|
373
127
|
|
|
374
128
|
## Contributing
|
|
375
129
|
|
|
376
|
-
Contributions welcome! Please:
|
|
130
|
+
Contributions are welcome! Please:
|
|
377
131
|
|
|
378
132
|
1. Fork the repository
|
|
379
|
-
2. Create feature branch
|
|
380
|
-
3. Commit changes
|
|
381
|
-
4. Push
|
|
382
|
-
5. Open Pull Request
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## Changelog
|
|
387
|
-
|
|
388
|
-
### [1.2.0] - 2026-03-05
|
|
389
|
-
|
|
390
|
-
**Added**
|
|
391
|
-
- Patient search by OpenMRS ID/identifier
|
|
392
|
-
- Patient search by name (partial matching)
|
|
393
|
-
- Patient search by phone number
|
|
394
|
-
- Custom API Call resource for advanced queries
|
|
395
|
-
|
|
396
|
-
**Changed**
|
|
397
|
-
- Improved error messages
|
|
398
|
-
- Better TypeScript types
|
|
399
|
-
- Updated documentation
|
|
400
|
-
|
|
401
|
-
### [1.1.0] - 2026-03-03
|
|
402
|
-
|
|
403
|
-
**Added**
|
|
404
|
-
- 6 FHIR resources (Patient, Encounter, Observation, etc.)
|
|
405
|
-
- Get and Get Many operations
|
|
406
|
-
- Pagination support
|
|
407
|
-
|
|
408
|
-
### [1.0.0] - 2026-03-01
|
|
409
|
-
|
|
410
|
-
**Added**
|
|
411
|
-
- Initial release
|
|
412
|
-
- Basic FHIR R4 support
|
|
133
|
+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
|
|
134
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
135
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
136
|
+
5. Open a Pull Request
|
|
413
137
|
|
|
414
138
|
---
|
|
415
139
|
|
|
@@ -417,15 +141,14 @@ Contributions welcome! Please:
|
|
|
417
141
|
|
|
418
142
|
[MIT License](LICENSE)
|
|
419
143
|
|
|
420
|
-
Copyright
|
|
144
|
+
Copyright (c) 2026 [Monfort Brian N.](https://github.com/monfortbrian)
|
|
421
145
|
|
|
422
146
|
---
|
|
423
147
|
|
|
424
148
|
## Support
|
|
425
149
|
|
|
426
|
-
- **Issues
|
|
427
|
-
- **
|
|
428
|
-
- **n8n Community**: [n8n Forum](https://community.n8n.io/)
|
|
150
|
+
- **Issues:** [GitHub Issues](https://github.com/monfortbrian/n8n-nodes-dhis2/issues)
|
|
151
|
+
- **n8n Community:** [n8n Community Forum](https://community.n8n.io/)
|
|
429
152
|
|
|
430
153
|
---
|
|
431
154
|
|
|
@@ -433,4 +156,6 @@ Copyright © 2026 Monfort Brian N.
|
|
|
433
156
|
|
|
434
157
|
Built for healthcare workers in low-resource settings. Enabling better patient outcomes through data interoperability and workflow automation.
|
|
435
158
|
|
|
436
|
-
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
**Made with ❤️ for the global health community**
|
|
@@ -25,7 +25,7 @@ class OpenMrs {
|
|
|
25
25
|
},
|
|
26
26
|
],
|
|
27
27
|
properties: [
|
|
28
|
-
//
|
|
28
|
+
// ===== RESOURCE =====
|
|
29
29
|
{
|
|
30
30
|
displayName: 'Resource',
|
|
31
31
|
name: 'resource',
|
|
@@ -42,18 +42,20 @@ class OpenMrs {
|
|
|
42
42
|
],
|
|
43
43
|
default: 'patient',
|
|
44
44
|
},
|
|
45
|
-
//
|
|
45
|
+
// ===== PATIENT OPERATIONS =====
|
|
46
46
|
{
|
|
47
47
|
displayName: 'Operation',
|
|
48
48
|
name: 'operation',
|
|
49
49
|
type: 'options',
|
|
50
50
|
noDataExpression: true,
|
|
51
|
-
displayOptions: {
|
|
52
|
-
show: {
|
|
53
|
-
resource: ['patient'],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
51
|
+
displayOptions: { show: { resource: ['patient'] } },
|
|
56
52
|
options: [
|
|
53
|
+
{
|
|
54
|
+
name: 'Create',
|
|
55
|
+
value: 'create',
|
|
56
|
+
description: 'Register a new patient',
|
|
57
|
+
action: 'Create a patient',
|
|
58
|
+
},
|
|
57
59
|
{
|
|
58
60
|
name: 'Get',
|
|
59
61
|
value: 'get',
|
|
@@ -87,7 +89,36 @@ class OpenMrs {
|
|
|
87
89
|
],
|
|
88
90
|
default: 'searchByIdentifier',
|
|
89
91
|
},
|
|
90
|
-
//
|
|
92
|
+
// ===== ENCOUNTER OPERATIONS =====
|
|
93
|
+
{
|
|
94
|
+
displayName: 'Operation',
|
|
95
|
+
name: 'operation',
|
|
96
|
+
type: 'options',
|
|
97
|
+
noDataExpression: true,
|
|
98
|
+
displayOptions: { show: { resource: ['encounter'] } },
|
|
99
|
+
options: [
|
|
100
|
+
{
|
|
101
|
+
name: 'Create',
|
|
102
|
+
value: 'create',
|
|
103
|
+
description: 'Create a new encounter for a patient',
|
|
104
|
+
action: 'Create an encounter',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'Get',
|
|
108
|
+
value: 'get',
|
|
109
|
+
description: 'Get an encounter by UUID',
|
|
110
|
+
action: 'Get an encounter',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'Get Many',
|
|
114
|
+
value: 'getAll',
|
|
115
|
+
description: 'Get many encounters for a patient',
|
|
116
|
+
action: 'Get many encounters',
|
|
117
|
+
},
|
|
118
|
+
],
|
|
119
|
+
default: 'get',
|
|
120
|
+
},
|
|
121
|
+
// ===== OTHER RESOURCE OPERATIONS =====
|
|
91
122
|
{
|
|
92
123
|
displayName: 'Operation',
|
|
93
124
|
name: 'operation',
|
|
@@ -95,42 +126,32 @@ class OpenMrs {
|
|
|
95
126
|
noDataExpression: true,
|
|
96
127
|
displayOptions: {
|
|
97
128
|
show: {
|
|
98
|
-
resource: [
|
|
99
|
-
'encounter',
|
|
100
|
-
'observation',
|
|
101
|
-
'diagnosticReport',
|
|
102
|
-
'condition',
|
|
103
|
-
'medicationStatement',
|
|
104
|
-
],
|
|
129
|
+
resource: ['observation', 'diagnosticReport', 'condition', 'medicationStatement'],
|
|
105
130
|
},
|
|
106
131
|
},
|
|
107
132
|
options: [
|
|
108
133
|
{
|
|
109
134
|
name: 'Get',
|
|
110
135
|
value: 'get',
|
|
111
|
-
description: 'Get a resource by
|
|
136
|
+
description: 'Get a resource by UUID',
|
|
112
137
|
action: 'Get a resource',
|
|
113
138
|
},
|
|
114
139
|
{
|
|
115
140
|
name: 'Get Many',
|
|
116
141
|
value: 'getAll',
|
|
117
|
-
description: 'Get many resources',
|
|
142
|
+
description: 'Get many resources for a patient',
|
|
118
143
|
action: 'Get many resources',
|
|
119
144
|
},
|
|
120
145
|
],
|
|
121
146
|
default: 'get',
|
|
122
147
|
},
|
|
123
|
-
//
|
|
148
|
+
// ===== CUSTOM API CALL OPERATION =====
|
|
124
149
|
{
|
|
125
150
|
displayName: 'Operation',
|
|
126
151
|
name: 'operation',
|
|
127
152
|
type: 'options',
|
|
128
153
|
noDataExpression: true,
|
|
129
|
-
displayOptions: {
|
|
130
|
-
show: {
|
|
131
|
-
resource: ['customApiCall'],
|
|
132
|
-
},
|
|
133
|
-
},
|
|
154
|
+
displayOptions: { show: { resource: ['customApiCall'] } },
|
|
134
155
|
options: [
|
|
135
156
|
{
|
|
136
157
|
name: 'Custom API Call',
|
|
@@ -141,33 +162,43 @@ class OpenMrs {
|
|
|
141
162
|
],
|
|
142
163
|
default: 'customApiCall',
|
|
143
164
|
},
|
|
144
|
-
//
|
|
165
|
+
// ===== PATIENT CREATE FIELDS =====
|
|
166
|
+
{
|
|
167
|
+
displayName: 'Patient (FHIR JSON)',
|
|
168
|
+
name: 'patientPayload',
|
|
169
|
+
type: 'json',
|
|
170
|
+
required: true,
|
|
171
|
+
displayOptions: { show: { resource: ['patient'], operation: ['create'] } },
|
|
172
|
+
default: '{\n "resourceType": "Patient",\n "identifier": [\n {\n "system": "http://openmrs.org/identifier",\n "value": "PATIENT-001"\n }\n ],\n "name": [\n {\n "family": "Doe",\n "given": ["John"]\n }\n ],\n "gender": "male",\n "birthDate": "1990-01-01",\n "telecom": [\n {\n "system": "phone",\n "value": "+250788123456"\n }\n ]\n}',
|
|
173
|
+
description: 'Full FHIR Patient resource. Must include resourceType, name, gender, birthDate.',
|
|
174
|
+
},
|
|
175
|
+
// ===== ENCOUNTER CREATE FIELDS =====
|
|
176
|
+
{
|
|
177
|
+
displayName: 'Encounter (FHIR JSON)',
|
|
178
|
+
name: 'encounterPayload',
|
|
179
|
+
type: 'json',
|
|
180
|
+
required: true,
|
|
181
|
+
displayOptions: { show: { resource: ['encounter'], operation: ['create'] } },
|
|
182
|
+
default: '{\n "resourceType": "Encounter",\n "status": "finished",\n "class": {\n "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",\n "code": "AMB",\n "display": "ambulatory"\n },\n "subject": {\n "reference": "Patient/PATIENT_UUID"\n },\n "period": {\n "start": "2026-06-02T08:00:00+00:00",\n "end": "2026-06-02T09:00:00+00:00"\n },\n "type": [\n {\n "coding": [\n {\n "system": "http://snomed.info/sct",\n "code": "11429006",\n "display": "Consultation"\n }\n ]\n }\n ]\n}',
|
|
183
|
+
description: 'Full FHIR Encounter resource. Must include resourceType, status, class, subject (Patient reference), and period.',
|
|
184
|
+
},
|
|
185
|
+
// ===== SEARCH FIELDS =====
|
|
145
186
|
{
|
|
146
187
|
displayName: 'Identifier',
|
|
147
188
|
name: 'identifier',
|
|
148
189
|
type: 'string',
|
|
149
190
|
required: true,
|
|
150
|
-
displayOptions: {
|
|
151
|
-
show: {
|
|
152
|
-
resource: ['patient'],
|
|
153
|
-
operation: ['searchByIdentifier'],
|
|
154
|
-
},
|
|
155
|
-
},
|
|
191
|
+
displayOptions: { show: { resource: ['patient'], operation: ['searchByIdentifier'] } },
|
|
156
192
|
default: '',
|
|
157
193
|
placeholder: '131280865',
|
|
158
|
-
description: 'OpenMRS ID or National ID
|
|
194
|
+
description: 'OpenMRS ID or National ID',
|
|
159
195
|
},
|
|
160
196
|
{
|
|
161
197
|
displayName: 'Name',
|
|
162
198
|
name: 'name',
|
|
163
199
|
type: 'string',
|
|
164
200
|
required: true,
|
|
165
|
-
displayOptions: {
|
|
166
|
-
show: {
|
|
167
|
-
resource: ['patient'],
|
|
168
|
-
operation: ['searchByName'],
|
|
169
|
-
},
|
|
170
|
-
},
|
|
201
|
+
displayOptions: { show: { resource: ['patient'], operation: ['searchByName'] } },
|
|
171
202
|
default: '',
|
|
172
203
|
placeholder: 'Patricia Lewis',
|
|
173
204
|
description: 'Patient name (supports partial matching)',
|
|
@@ -177,28 +208,18 @@ class OpenMrs {
|
|
|
177
208
|
name: 'phone',
|
|
178
209
|
type: 'string',
|
|
179
210
|
required: true,
|
|
180
|
-
displayOptions: {
|
|
181
|
-
show: {
|
|
182
|
-
resource: ['patient'],
|
|
183
|
-
operation: ['searchByPhone'],
|
|
184
|
-
},
|
|
185
|
-
},
|
|
211
|
+
displayOptions: { show: { resource: ['patient'], operation: ['searchByPhone'] } },
|
|
186
212
|
default: '',
|
|
187
213
|
placeholder: '+254712345678',
|
|
188
214
|
description: 'Phone number in any format',
|
|
189
215
|
},
|
|
190
|
-
//
|
|
216
|
+
// ===== GET BY UUID FIELDS =====
|
|
191
217
|
{
|
|
192
218
|
displayName: 'Patient ID',
|
|
193
219
|
name: 'patientId',
|
|
194
220
|
type: 'string',
|
|
195
221
|
required: true,
|
|
196
|
-
displayOptions: {
|
|
197
|
-
show: {
|
|
198
|
-
resource: ['patient'],
|
|
199
|
-
operation: ['get'],
|
|
200
|
-
},
|
|
201
|
-
},
|
|
222
|
+
displayOptions: { show: { resource: ['patient'], operation: ['get'] } },
|
|
202
223
|
default: '',
|
|
203
224
|
description: 'The UUID of the patient',
|
|
204
225
|
},
|
|
@@ -207,12 +228,7 @@ class OpenMrs {
|
|
|
207
228
|
name: 'encounterId',
|
|
208
229
|
type: 'string',
|
|
209
230
|
required: true,
|
|
210
|
-
displayOptions: {
|
|
211
|
-
show: {
|
|
212
|
-
resource: ['encounter'],
|
|
213
|
-
operation: ['get'],
|
|
214
|
-
},
|
|
215
|
-
},
|
|
231
|
+
displayOptions: { show: { resource: ['encounter'], operation: ['get'] } },
|
|
216
232
|
default: '',
|
|
217
233
|
description: 'The UUID of the encounter',
|
|
218
234
|
},
|
|
@@ -221,12 +237,7 @@ class OpenMrs {
|
|
|
221
237
|
name: 'observationId',
|
|
222
238
|
type: 'string',
|
|
223
239
|
required: true,
|
|
224
|
-
displayOptions: {
|
|
225
|
-
show: {
|
|
226
|
-
resource: ['observation'],
|
|
227
|
-
operation: ['get'],
|
|
228
|
-
},
|
|
229
|
-
},
|
|
240
|
+
displayOptions: { show: { resource: ['observation'], operation: ['get'] } },
|
|
230
241
|
default: '',
|
|
231
242
|
description: 'The UUID of the observation',
|
|
232
243
|
},
|
|
@@ -235,12 +246,7 @@ class OpenMrs {
|
|
|
235
246
|
name: 'diagnosticReportId',
|
|
236
247
|
type: 'string',
|
|
237
248
|
required: true,
|
|
238
|
-
displayOptions: {
|
|
239
|
-
show: {
|
|
240
|
-
resource: ['diagnosticReport'],
|
|
241
|
-
operation: ['get'],
|
|
242
|
-
},
|
|
243
|
-
},
|
|
249
|
+
displayOptions: { show: { resource: ['diagnosticReport'], operation: ['get'] } },
|
|
244
250
|
default: '',
|
|
245
251
|
description: 'The UUID of the diagnostic report',
|
|
246
252
|
},
|
|
@@ -249,12 +255,7 @@ class OpenMrs {
|
|
|
249
255
|
name: 'conditionId',
|
|
250
256
|
type: 'string',
|
|
251
257
|
required: true,
|
|
252
|
-
displayOptions: {
|
|
253
|
-
show: {
|
|
254
|
-
resource: ['condition'],
|
|
255
|
-
operation: ['get'],
|
|
256
|
-
},
|
|
257
|
-
},
|
|
258
|
+
displayOptions: { show: { resource: ['condition'], operation: ['get'] } },
|
|
258
259
|
default: '',
|
|
259
260
|
description: 'The UUID of the condition',
|
|
260
261
|
},
|
|
@@ -263,25 +264,16 @@ class OpenMrs {
|
|
|
263
264
|
name: 'medicationStatementId',
|
|
264
265
|
type: 'string',
|
|
265
266
|
required: true,
|
|
266
|
-
displayOptions: {
|
|
267
|
-
show: {
|
|
268
|
-
resource: ['medicationStatement'],
|
|
269
|
-
operation: ['get'],
|
|
270
|
-
},
|
|
271
|
-
},
|
|
267
|
+
displayOptions: { show: { resource: ['medicationStatement'], operation: ['get'] } },
|
|
272
268
|
default: '',
|
|
273
269
|
description: 'The UUID of the medication statement',
|
|
274
270
|
},
|
|
275
|
-
//
|
|
271
|
+
// ===== CUSTOM API CALL FIELDS =====
|
|
276
272
|
{
|
|
277
273
|
displayName: 'HTTP Method',
|
|
278
274
|
name: 'httpMethod',
|
|
279
275
|
type: 'options',
|
|
280
|
-
displayOptions: {
|
|
281
|
-
show: {
|
|
282
|
-
resource: ['customApiCall'],
|
|
283
|
-
},
|
|
284
|
-
},
|
|
276
|
+
displayOptions: { show: { resource: ['customApiCall'] } },
|
|
285
277
|
options: [
|
|
286
278
|
{ name: 'DELETE', value: 'DELETE' },
|
|
287
279
|
{ name: 'GET', value: 'GET' },
|
|
@@ -296,11 +288,7 @@ class OpenMrs {
|
|
|
296
288
|
name: 'endpoint',
|
|
297
289
|
type: 'string',
|
|
298
290
|
required: true,
|
|
299
|
-
displayOptions: {
|
|
300
|
-
show: {
|
|
301
|
-
resource: ['customApiCall'],
|
|
302
|
-
},
|
|
303
|
-
},
|
|
291
|
+
displayOptions: { show: { resource: ['customApiCall'] } },
|
|
304
292
|
default: '/ws/fhir2/R4/Patient',
|
|
305
293
|
placeholder: '/ws/fhir2/R4/Patient',
|
|
306
294
|
description: 'The API endpoint (e.g., /ws/fhir2/R4/Patient)',
|
|
@@ -309,14 +297,8 @@ class OpenMrs {
|
|
|
309
297
|
displayName: 'Query Parameters',
|
|
310
298
|
name: 'queryParameters',
|
|
311
299
|
type: 'fixedCollection',
|
|
312
|
-
typeOptions: {
|
|
313
|
-
|
|
314
|
-
},
|
|
315
|
-
displayOptions: {
|
|
316
|
-
show: {
|
|
317
|
-
resource: ['customApiCall'],
|
|
318
|
-
},
|
|
319
|
-
},
|
|
300
|
+
typeOptions: { multipleValues: true },
|
|
301
|
+
displayOptions: { show: { resource: ['customApiCall'] } },
|
|
320
302
|
default: {},
|
|
321
303
|
placeholder: 'Add Parameter',
|
|
322
304
|
options: [
|
|
@@ -340,7 +322,7 @@ class OpenMrs {
|
|
|
340
322
|
},
|
|
341
323
|
],
|
|
342
324
|
},
|
|
343
|
-
//
|
|
325
|
+
// ===== GET MANY PATIENT FILTER =====
|
|
344
326
|
{
|
|
345
327
|
displayName: 'Patient ID',
|
|
346
328
|
name: 'patientIdFilter',
|
|
@@ -348,20 +330,14 @@ class OpenMrs {
|
|
|
348
330
|
required: true,
|
|
349
331
|
displayOptions: {
|
|
350
332
|
show: {
|
|
351
|
-
resource: [
|
|
352
|
-
'encounter',
|
|
353
|
-
'observation',
|
|
354
|
-
'diagnosticReport',
|
|
355
|
-
'condition',
|
|
356
|
-
'medicationStatement',
|
|
357
|
-
],
|
|
333
|
+
resource: ['encounter', 'observation', 'diagnosticReport', 'condition', 'medicationStatement'],
|
|
358
334
|
operation: ['getAll'],
|
|
359
335
|
},
|
|
360
336
|
},
|
|
361
337
|
default: '',
|
|
362
338
|
description: 'The UUID of the patient to filter results by',
|
|
363
339
|
},
|
|
364
|
-
//
|
|
340
|
+
// ===== PAGINATION =====
|
|
365
341
|
{
|
|
366
342
|
displayName: 'Return All',
|
|
367
343
|
name: 'returnAll',
|
|
@@ -384,10 +360,7 @@ class OpenMrs {
|
|
|
384
360
|
returnAll: [false],
|
|
385
361
|
},
|
|
386
362
|
},
|
|
387
|
-
typeOptions: {
|
|
388
|
-
minValue: 1,
|
|
389
|
-
maxValue: 100,
|
|
390
|
-
},
|
|
363
|
+
typeOptions: { minValue: 1, maxValue: 100 },
|
|
391
364
|
default: 50,
|
|
392
365
|
description: 'Max number of results to return',
|
|
393
366
|
},
|
|
@@ -399,7 +372,7 @@ class OpenMrs {
|
|
|
399
372
|
const items = this.getInputData();
|
|
400
373
|
const returnData = [];
|
|
401
374
|
const credentials = await this.getCredentials('openMrsApi');
|
|
402
|
-
const baseUrl = credentials.baseUrl;
|
|
375
|
+
const baseUrl = credentials.baseUrl.replace(/\/$/, '');
|
|
403
376
|
const fhirResourceMap = {
|
|
404
377
|
patient: 'Patient',
|
|
405
378
|
encounter: 'Encounter',
|
|
@@ -422,7 +395,9 @@ class OpenMrs {
|
|
|
422
395
|
const operation = this.getNodeParameter('operation', i);
|
|
423
396
|
let endpoint = '';
|
|
424
397
|
const qs = {};
|
|
425
|
-
//
|
|
398
|
+
// ----------------------------------------------------------------
|
|
399
|
+
// Custom API Call returns early
|
|
400
|
+
// ----------------------------------------------------------------
|
|
426
401
|
if (resource === 'customApiCall') {
|
|
427
402
|
const httpMethod = this.getNodeParameter('httpMethod', i);
|
|
428
403
|
endpoint = this.getNodeParameter('endpoint', i);
|
|
@@ -441,64 +416,94 @@ class OpenMrs {
|
|
|
441
416
|
returnData.push({ json: response, pairedItem: { item: i } });
|
|
442
417
|
continue;
|
|
443
418
|
}
|
|
444
|
-
//
|
|
445
|
-
|
|
446
|
-
//
|
|
419
|
+
// ----------------------------------------------------------------
|
|
420
|
+
// Patient: Create POST, returns early
|
|
421
|
+
// ----------------------------------------------------------------
|
|
422
|
+
if (resource === 'patient' && operation === 'create') {
|
|
423
|
+
const raw = this.getNodeParameter('patientPayload', i);
|
|
424
|
+
const body = JSON.parse(typeof raw === 'string' ? raw : JSON.stringify(raw));
|
|
425
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'openMrsApi', {
|
|
426
|
+
method: 'POST',
|
|
427
|
+
url: `${baseUrl}/ws/fhir2/R4/Patient`,
|
|
428
|
+
body,
|
|
429
|
+
json: true,
|
|
430
|
+
});
|
|
431
|
+
returnData.push({ json: response, pairedItem: { item: i } });
|
|
432
|
+
continue;
|
|
433
|
+
}
|
|
434
|
+
// ----------------------------------------------------------------
|
|
435
|
+
// Encounter: Create POST, returns early
|
|
436
|
+
// ----------------------------------------------------------------
|
|
437
|
+
if (resource === 'encounter' && operation === 'create') {
|
|
438
|
+
const raw = this.getNodeParameter('encounterPayload', i);
|
|
439
|
+
const body = JSON.parse(typeof raw === 'string' ? raw : JSON.stringify(raw));
|
|
440
|
+
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'openMrsApi', {
|
|
441
|
+
method: 'POST',
|
|
442
|
+
url: `${baseUrl}/ws/fhir2/R4/Encounter`,
|
|
443
|
+
body,
|
|
444
|
+
json: true,
|
|
445
|
+
});
|
|
446
|
+
returnData.push({ json: response, pairedItem: { item: i } });
|
|
447
|
+
continue;
|
|
448
|
+
}
|
|
449
|
+
// ----------------------------------------------------------------
|
|
450
|
+
// Get by UUID
|
|
451
|
+
// ----------------------------------------------------------------
|
|
447
452
|
if (operation === 'get') {
|
|
448
453
|
const idParam = resourceIdParamMap[resource];
|
|
449
454
|
const resourceId = this.getNodeParameter(idParam, i);
|
|
455
|
+
const fhirResource = fhirResourceMap[resource];
|
|
450
456
|
endpoint = `/ws/fhir2/R4/${fhirResource}/${resourceId}`;
|
|
451
457
|
}
|
|
452
|
-
//
|
|
458
|
+
// ----------------------------------------------------------------
|
|
459
|
+
// Search operations (Patient only)
|
|
460
|
+
// ----------------------------------------------------------------
|
|
453
461
|
else if (operation === 'searchByIdentifier') {
|
|
454
462
|
const identifier = this.getNodeParameter('identifier', i);
|
|
455
|
-
endpoint =
|
|
463
|
+
endpoint = '/ws/fhir2/R4/Patient';
|
|
456
464
|
qs.identifier = identifier;
|
|
457
465
|
const returnAll = this.getNodeParameter('returnAll', i, false);
|
|
458
|
-
if (!returnAll)
|
|
466
|
+
if (!returnAll)
|
|
459
467
|
qs._count = this.getNodeParameter('limit', i, 50);
|
|
460
|
-
}
|
|
461
468
|
}
|
|
462
|
-
// Search by Name
|
|
463
469
|
else if (operation === 'searchByName') {
|
|
464
470
|
const name = this.getNodeParameter('name', i);
|
|
465
|
-
endpoint =
|
|
471
|
+
endpoint = '/ws/fhir2/R4/Patient';
|
|
466
472
|
qs.name = name;
|
|
467
473
|
const returnAll = this.getNodeParameter('returnAll', i, false);
|
|
468
|
-
if (!returnAll)
|
|
474
|
+
if (!returnAll)
|
|
469
475
|
qs._count = this.getNodeParameter('limit', i, 50);
|
|
470
|
-
}
|
|
471
476
|
}
|
|
472
|
-
// Search by Phone
|
|
473
477
|
else if (operation === 'searchByPhone') {
|
|
474
478
|
const phone = this.getNodeParameter('phone', i);
|
|
475
|
-
endpoint =
|
|
479
|
+
endpoint = '/ws/fhir2/R4/Patient';
|
|
476
480
|
qs.telecom = phone;
|
|
477
481
|
const returnAll = this.getNodeParameter('returnAll', i, false);
|
|
478
|
-
if (!returnAll)
|
|
482
|
+
if (!returnAll)
|
|
479
483
|
qs._count = this.getNodeParameter('limit', i, 50);
|
|
480
|
-
}
|
|
481
484
|
}
|
|
482
|
-
//
|
|
485
|
+
// ----------------------------------------------------------------
|
|
486
|
+
// Get Many
|
|
487
|
+
// ----------------------------------------------------------------
|
|
483
488
|
else if (operation === 'getAll') {
|
|
489
|
+
const fhirResource = fhirResourceMap[resource];
|
|
484
490
|
endpoint = `/ws/fhir2/R4/${fhirResource}`;
|
|
485
491
|
if (resource !== 'patient') {
|
|
486
|
-
|
|
487
|
-
qs.patient = patientId;
|
|
492
|
+
qs.patient = this.getNodeParameter('patientIdFilter', i);
|
|
488
493
|
}
|
|
489
494
|
const returnAll = this.getNodeParameter('returnAll', i);
|
|
490
|
-
if (!returnAll)
|
|
495
|
+
if (!returnAll)
|
|
491
496
|
qs._count = this.getNodeParameter('limit', i);
|
|
492
|
-
}
|
|
493
497
|
}
|
|
494
|
-
//
|
|
498
|
+
// ----------------------------------------------------------------
|
|
499
|
+
// Shared GET handler
|
|
500
|
+
// ----------------------------------------------------------------
|
|
495
501
|
const response = await this.helpers.httpRequestWithAuthentication.call(this, 'openMrsApi', {
|
|
496
502
|
method: 'GET',
|
|
497
503
|
url: `${baseUrl}${endpoint}`,
|
|
498
504
|
qs,
|
|
499
505
|
json: true,
|
|
500
506
|
});
|
|
501
|
-
// Process response
|
|
502
507
|
if (Array.isArray(response)) {
|
|
503
508
|
returnData.push(...response.map((item) => ({ json: item, pairedItem: { item: i } })));
|
|
504
509
|
}
|
|
@@ -515,8 +520,10 @@ class OpenMrs {
|
|
|
515
520
|
}
|
|
516
521
|
catch (error) {
|
|
517
522
|
if (this.continueOnFail()) {
|
|
518
|
-
|
|
519
|
-
|
|
523
|
+
returnData.push({
|
|
524
|
+
json: { error: error instanceof Error ? error.message : 'Unknown error' },
|
|
525
|
+
pairedItem: { item: i },
|
|
526
|
+
});
|
|
520
527
|
continue;
|
|
521
528
|
}
|
|
522
529
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error instanceof Error ? error : new Error(String(error)), { itemIndex: i });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenMrs.node.js","sourceRoot":"","sources":["../../../nodes/OpenMrs/OpenMrs.node.ts"],"names":[],"mappings":";;;AAQA,+CAAkD;AAElD,MAAa,OAAO;IAApB;QACC,iBAAY,GAAG,IAAI,CAAC;QACpB,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YACtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YACD,MAAM,EAAE,CAAC,MAAM,CAAC;YAChB,OAAO,EAAE,CAAC,MAAM,CAAC;YACjB,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,UAAU,EAAE;gBACX,qBAAqB;gBACrB;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;wBACzC,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE;wBACnD,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,kBAAkB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HANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-openmrs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "n8n community node for OpenMRS FHIR R4 integration. Access patient demographics, encounters, observations, diagnostic reports, conditions, and medication statements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package",
|