1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "id": "H1",
14 "hospital": "Hospital A",
15 "payer": "Payer X",
16 "code": "99213",
17 "rate": 180,
18 "plan": "PPO"
19 },
20 {
21 "id": "H2",
22 "hospital": "Hospital A",
23 "payer": "Payer Y",
24 "code": "99213",
25 "rate": 260,
26 "plan": "PPO"
27 },
28 {
29 "id": "H3",
30 "hospital": "Hospital B",
31 "payer": "Payer X",
32 "code": "99213",
33 "rate": 210,
34 "plan": "HMO"
35 }
36 ],
37 "previousItems": [
38 {
39 "id": "P1",
40 "hospital": "Hospital A",
41 "payer": "Payer X",
42 "code": "99213",
43 "rate": 150,
44 "plan": "PPO"
45 },
46 {
47 "id": "P2",
48 "hospital": "Hospital A",
49 "payer": "Payer Y",
50 "code": "99213",
51 "rate": 240,
52 "plan": "PPO"
53 },
54 {
55 "id": "P3",
56 "hospital": "Hospital B",
57 "payer": "Payer X",
58 "code": "99213",
59 "rate": 205,
60 "plan": "HMO"
61 }
62 ]
63};
64
65
66const run = await client.actor("quanmatrix/hospital-price-transparency-drift-intelligence").call(input);
67
68
69console.log('Results from dataset');
70console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
71const { items } = await client.dataset(run.defaultDatasetId).listItems();
72items.forEach((item) => {
73 console.dir(item);
74});
75
76