@nsshunt/stsdatamanagement 1.18.100 → 1.18.102
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 +84 -56
- package/db-scripts/builddb.sql +54 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,100 +29,128 @@ docker run --name postgres-5432 -e POSTGRES_PASSWORD=postgres -p 5432:5432 -d --
|
|
|
29
29
|
|
|
30
30
|
select count(*) from stsresource;
|
|
31
31
|
|
|
32
|
-
/* Create
|
|
32
|
+
/* Create General Search Indexes */
|
|
33
33
|
|
|
34
34
|
/* GIN Index */
|
|
35
|
-
drop index idx_stsresource_gin;
|
|
35
|
+
--drop index idx_stsresource_gin;
|
|
36
36
|
CREATE INDEX idx_stsresource_gin ON stsresource USING GIN (resdesc_jsonb);
|
|
37
37
|
|
|
38
38
|
/* btree indexes */
|
|
39
|
-
drop index idx_stsresource_id;
|
|
39
|
+
--drop index idx_stsresource_id;
|
|
40
|
+
--We don't use where here becuase all FHIR resources will have an id field
|
|
40
41
|
CREATE INDEX idx_stsresource_id ON stsresource ((resdesc_jsonb->>'id'));
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
CREATE INDEX idx_stsresource_given ON stsresource ((resdesc_jsonb->'name'->0->>'given'));
|
|
43
|
+
-- Create Indexes for FHIR resources
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
CREATE INDEX
|
|
45
|
+
--DROP INDEX idx_stsresource_given;
|
|
46
|
+
CREATE INDEX idx_stsresource_given
|
|
47
|
+
ON stsresource ((resdesc_jsonb->'name'->0->>'given'))
|
|
48
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person';
|
|
47
49
|
|
|
48
|
-
drop index
|
|
50
|
+
--drop index idx_stsresource_family;
|
|
51
|
+
CREATE INDEX idx_stsresource_family ON stsresource ((resdesc_jsonb->'name'->0->>'family'))
|
|
52
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person';
|
|
53
|
+
|
|
54
|
+
--drop index idx_stsresource_text_div_01;
|
|
49
55
|
CREATE INDEX idx_stsresource_text_div_01
|
|
50
|
-
ON stsresource ((resdesc_jsonb->'text'->>'div'))
|
|
56
|
+
ON stsresource ((resdesc_jsonb->'text'->>'div'))
|
|
57
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person';
|
|
51
58
|
|
|
52
59
|
/* btree indexes - alternate method - for queries, quotes will be need '"<search string>"' */
|
|
53
|
-
drop index idx_stsresource_text_div_02;
|
|
60
|
+
--drop index idx_stsresource_text_div_02;
|
|
54
61
|
CREATE INDEX idx_stsresource_text_div_02
|
|
55
|
-
ON stsresource ((resdesc_jsonb#>'{text,div}'))
|
|
62
|
+
ON stsresource ((resdesc_jsonb#>'{text,div}'))
|
|
63
|
+
WHERE (resdesc_jsonb#>'{_resourceType}')::text = '"Person"';
|
|
56
64
|
|
|
57
65
|
/* Queries using our indexes */
|
|
58
66
|
|
|
59
|
-
/* Get record using the BTREE index given */
|
|
60
|
-
|
|
61
|
-
select
|
|
62
|
-
resdesc_jsonb->'id' as id,
|
|
63
|
-
resdesc_jsonb->'name'->0->>'given' as given,
|
|
64
|
-
resdesc_jsonb->'name'->0->>'family' as family,
|
|
65
|
-
resdesc_jsonb->'name' as name
|
|
66
|
-
from stsresource
|
|
67
|
-
where resdesc_jsonb notnull
|
|
68
|
-
and resdesc_jsonb->'name'->0->>'given' >= 'y' and resdesc_jsonb->'name'->0->>'given' < 'yzzzzzzzzzzzzz'
|
|
69
|
-
and validto is null
|
|
70
|
-
order by family, given, id
|
|
71
|
-
limit 20;
|
|
72
|
-
|
|
73
67
|
/* Get records using the GIN index */
|
|
74
68
|
SELECT *
|
|
75
69
|
FROM stsresource
|
|
76
|
-
WHERE resdesc_jsonb @> '{"
|
|
70
|
+
WHERE resdesc_jsonb @> '{"_resourceType": "Person"}'
|
|
71
|
+
AND resdesc_jsonb @> '{"name": [{"family": "Adams"}]}'
|
|
72
|
+
LIMIT 20
|
|
77
73
|
|
|
78
74
|
SELECT oid, resdesc_jsonb#>'{text,div}' AS text_div
|
|
79
75
|
FROM stsresource
|
|
80
|
-
WHERE resdesc_jsonb
|
|
76
|
+
WHERE resdesc_jsonb @> '{"_resourceType": "Person"}'
|
|
81
77
|
AND resdesc_jsonb @> '{"text": {"div": "New Record 100"}}';
|
|
82
|
-
|
|
78
|
+
|
|
79
|
+
/* Get record using the BTREE index given */
|
|
80
|
+
SELECT resdesc_jsonb->'id' as id,
|
|
81
|
+
resdesc_jsonb->'name'->0->>'given' as given,
|
|
82
|
+
resdesc_jsonb->'name'->0->>'family' as family,
|
|
83
|
+
resdesc_jsonb->'name' as name
|
|
84
|
+
FROM stsresource
|
|
85
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person'
|
|
86
|
+
AND resdesc_jsonb->'name'->0->>'given' >= 'y' and resdesc_jsonb->'name'->0->>'given' < 'yzzzzzzzzzzzzz'
|
|
87
|
+
AND validto is null
|
|
88
|
+
ORDER BY family, given, id
|
|
89
|
+
LIMIT 20;
|
|
90
|
+
|
|
83
91
|
/* Get record using the BTREE index 01 */
|
|
84
92
|
SELECT oid, resdesc_jsonb#>'{text,div}' AS text_div
|
|
85
93
|
FROM stsresource
|
|
86
|
-
WHERE resdesc_jsonb
|
|
94
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person'
|
|
87
95
|
AND resdesc_jsonb->'text'->>'div' = 'New Record 200';
|
|
88
96
|
|
|
89
97
|
/* Get record using the BTREE index 02 */
|
|
90
98
|
SELECT oid, resdesc_jsonb#>'{text,div}' AS text_div
|
|
91
99
|
FROM stsresource
|
|
92
|
-
WHERE resdesc_jsonb
|
|
100
|
+
WHERE (resdesc_jsonb#>'{_resourceType}')::text = '"Person"'
|
|
93
101
|
AND resdesc_jsonb#>'{text,div}' = '"New Record 400"';
|
|
94
|
-
|
|
102
|
+
|
|
95
103
|
/* Query using id index */
|
|
96
104
|
SELECT oid, resdesc_jsonb->>'id' as id, *
|
|
97
105
|
FROM stsresource
|
|
98
|
-
WHERE resdesc_jsonb->>'id' >= '
|
|
99
|
-
|
|
106
|
+
WHERE resdesc_jsonb->>'id' >= '_' and resdesc_jsonb->>'id' < '_zzzzzzzzzzzz'
|
|
107
|
+
ORDER BY resdesc_jsonb->>'id'
|
|
100
108
|
LIMIT 20;
|
|
101
109
|
|
|
102
110
|
/* Query using given index */
|
|
103
|
-
SELECT distinct given, family
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
resdesc_jsonb
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
AND resdesc_jsonb->'name'->0->>'given' < 'azzzzzzz'
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
SELECT distinct given, family
|
|
112
|
+
FROM (
|
|
113
|
+
SELECT resdesc_jsonb->'name'->0->>'given' as given, resdesc_jsonb->'name'->0->>'family' as family
|
|
114
|
+
FROM stsresource
|
|
115
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person'
|
|
116
|
+
AND validto is null
|
|
117
|
+
AND resdesc_jsonb->'name'->0->>'given' >= 'a'
|
|
118
|
+
AND resdesc_jsonb->'name'->0->>'given' < 'azzzzzzz'
|
|
119
|
+
)
|
|
120
|
+
ORDER BY given DESC
|
|
121
|
+
LIMIT 20;
|
|
114
122
|
|
|
115
|
-
/* Query using family
|
|
116
|
-
SELECT distinct given
|
|
117
|
-
resdesc_jsonb->'name'->0->>'family' as family
|
|
123
|
+
/* Query using family indexes */
|
|
124
|
+
SELECT distinct resdesc_jsonb->'name'->0->>'given' as given, resdesc_jsonb->'name'->0->>'family' as family
|
|
118
125
|
FROM stsresource
|
|
119
|
-
WHERE
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person'
|
|
127
|
+
AND validto is null
|
|
128
|
+
AND resdesc_jsonb->'name'->0->>'family' >= 'y'
|
|
129
|
+
AND resdesc_jsonb->'name'->0->>'family' < 'yzzzzzzzzzzzz'
|
|
130
|
+
ORDER BY given DESC
|
|
131
|
+
LIMIT 20
|
|
132
|
+
|
|
133
|
+
/* Query using family and given indexes */
|
|
134
|
+
SELECT distinct given, family
|
|
135
|
+
FROM (
|
|
136
|
+
SELECT resdesc_jsonb->'name'->0->>'given' as given, resdesc_jsonb->'name'->0->>'family' as family
|
|
137
|
+
FROM stsresource
|
|
138
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person'
|
|
139
|
+
AND validto is null
|
|
140
|
+
AND resdesc_jsonb->'name'->0->>'given' >= 'a'
|
|
141
|
+
AND resdesc_jsonb->'name'->0->>'given' < 'azzzzzzz'
|
|
142
|
+
AND resdesc_jsonb->'name'->0->>'family' >= 'y'
|
|
143
|
+
AND resdesc_jsonb->'name'->0->>'family' < 'yzzzzzzzzzzzz'
|
|
144
|
+
)
|
|
145
|
+
ORDER BY given DESC
|
|
146
|
+
LIMIT 20;
|
|
128
147
|
|
|
148
|
+
/* Query using given indexes */
|
|
149
|
+
select count(*) from (
|
|
150
|
+
SELECT distinct resdesc_jsonb->'name'->0->>'given' as given
|
|
151
|
+
FROM stsresource
|
|
152
|
+
WHERE validto is null
|
|
153
|
+
AND resdesc_jsonb->>'_resourceType' = 'Person'
|
|
154
|
+
AND resdesc_jsonb->'name'->0->>'given' >= 'al'
|
|
155
|
+
AND resdesc_jsonb->'name'->0->>'given' < 'alzzzzzzz'
|
|
156
|
+
)
|
package/db-scripts/builddb.sql
CHANGED
|
@@ -38,6 +38,8 @@ CREATE TABLE public.stsresource
|
|
|
38
38
|
resname character varying(128) COLLATE pg_catalog."default" NOT NULL,
|
|
39
39
|
resdesc character varying(32768) COLLATE pg_catalog."default",
|
|
40
40
|
resdesc_jsonb jsonb,
|
|
41
|
+
given character varying(64) COLLATE pg_catalog."default",
|
|
42
|
+
family character varying(64) COLLATE pg_catalog."default",
|
|
41
43
|
vnum bigint NOT NULL,
|
|
42
44
|
validfrom timestamp with time zone NOT NULL,
|
|
43
45
|
validto timestamp with time zone,
|
|
@@ -68,6 +70,21 @@ CREATE INDEX stsresource_resname_validto
|
|
|
68
70
|
TABLESPACE pg_default;
|
|
69
71
|
|
|
70
72
|
|
|
73
|
+
-- DROP INDEX public.stsresource_given;
|
|
74
|
+
|
|
75
|
+
CREATE INDEX stsresource_given
|
|
76
|
+
ON public.stsresource USING btree
|
|
77
|
+
(given COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
78
|
+
TABLESPACE pg_default;
|
|
79
|
+
|
|
80
|
+
-- DROP INDEX public.stsresource_family;
|
|
81
|
+
|
|
82
|
+
CREATE INDEX stsresource_family
|
|
83
|
+
ON public.stsresource USING btree
|
|
84
|
+
(family COLLATE pg_catalog."default" ASC NULLS LAST)
|
|
85
|
+
TABLESPACE pg_default;
|
|
86
|
+
|
|
87
|
+
|
|
71
88
|
-- FUNCTION: public.create_stsresource(character varying, character varying, character varying)
|
|
72
89
|
|
|
73
90
|
-- DROP FUNCTION public.create_stsresource(character varying, character varying, character varying);
|
|
@@ -91,9 +108,13 @@ DECLARE
|
|
|
91
108
|
__dbaction smallint;
|
|
92
109
|
__inserted_oid bigint;
|
|
93
110
|
_resdesc_jsonb JSONB;
|
|
111
|
+
_given character varying(64) COLLATE pg_catalog."default";
|
|
112
|
+
_family character varying(64) COLLATE pg_catalog."default";
|
|
94
113
|
BEGIN
|
|
95
114
|
begin
|
|
96
115
|
_resdesc_jsonb := _resdesc::jsonb;
|
|
116
|
+
_given := _resdesc_jsonb->'name'->0->>'given';
|
|
117
|
+
_family := _resdesc_jsonb->'name'->0->>'_family';
|
|
97
118
|
exception
|
|
98
119
|
when others then
|
|
99
120
|
raise exception 'Invalid JSON string: %', _resdesc;
|
|
@@ -114,8 +135,8 @@ BEGIN
|
|
|
114
135
|
update stsresource set validto = __now where oid = __resoid;
|
|
115
136
|
|
|
116
137
|
-- Create a new record
|
|
117
|
-
insert into stsresource(resname, resdesc, resdesc_jsonb, vnum, dbaction, dbactionuser, validfrom)
|
|
118
|
-
values (_resname, _resdesc, _resdesc_jsonb, __vnum+1, 1, _dbactionuser, __now)
|
|
138
|
+
insert into stsresource(resname, resdesc, resdesc_jsonb, given, family, vnum, dbaction, dbactionuser, validfrom)
|
|
139
|
+
values (_resname, _resdesc, _resdesc_jsonb, _given, _family, __vnum+1, 1, _dbactionuser, __now)
|
|
119
140
|
returning oid into __inserted_oid;
|
|
120
141
|
|
|
121
142
|
return query
|
|
@@ -135,8 +156,8 @@ BEGIN
|
|
|
135
156
|
returning *;
|
|
136
157
|
*/
|
|
137
158
|
|
|
138
|
-
insert into stsresource(resname, resdesc, resdesc_jsonb, vnum, dbaction, dbactionuser, validfrom)
|
|
139
|
-
values (_resname, _resdesc, _resdesc_jsonb, 1, 1, _dbactionuser, __now)
|
|
159
|
+
insert into stsresource(resname, resdesc, resdesc_jsonb, given, family, vnum, dbaction, dbactionuser, validfrom)
|
|
160
|
+
values (_resname, _resdesc, _resdesc_jsonb, _given, _family, 1, 1, _dbactionuser, __now)
|
|
140
161
|
returning oid into __inserted_oid;
|
|
141
162
|
|
|
142
163
|
return query
|
|
@@ -171,9 +192,13 @@ declare
|
|
|
171
192
|
resoid bigint;
|
|
172
193
|
newresoid stsresource.oid%TYPE;
|
|
173
194
|
_resdesc_jsonb JSONB;
|
|
195
|
+
_given character varying(64) COLLATE pg_catalog."default";
|
|
196
|
+
_family character varying(64) COLLATE pg_catalog."default";
|
|
174
197
|
BEGIN
|
|
175
198
|
begin
|
|
176
199
|
_resdesc_jsonb := _resdesc::jsonb;
|
|
200
|
+
_given := _resdesc_jsonb->'name'->0->>'given';
|
|
201
|
+
_family := _resdesc_jsonb->'name'->0->>'_family';
|
|
177
202
|
exception
|
|
178
203
|
when others then
|
|
179
204
|
raise exception 'Invalid JSON string: %', _resdesc;
|
|
@@ -193,8 +218,8 @@ BEGIN
|
|
|
193
218
|
|
|
194
219
|
update stsresource set validto = _now where oid = resoid;
|
|
195
220
|
|
|
196
|
-
insert into stsresource(resname, resdesc, resdesc_jsonb, vnum, dbaction, dbactionuser, validfrom)
|
|
197
|
-
values (_resname, _resdesc, _resdesc_jsonb, _resvnum+1, 2, _dbactionuser, _now)
|
|
221
|
+
insert into stsresource(resname, resdesc, resdesc_jsonb, given, family, vnum, dbaction, dbactionuser, validfrom)
|
|
222
|
+
values (_resname, _resdesc, _resdesc_jsonb, _given, _family, _resvnum+1, 2, _dbactionuser, _now)
|
|
198
223
|
RETURNING oid INTO newresoid;
|
|
199
224
|
|
|
200
225
|
update stsentity set resourceoid = newresoid where resourceoid = resoid;
|
|
@@ -230,9 +255,13 @@ declare
|
|
|
230
255
|
newresoid stsresource.oid%TYPE;
|
|
231
256
|
_resvnum integer;
|
|
232
257
|
_resdesc_jsonb JSONB;
|
|
258
|
+
_given character varying(64) COLLATE pg_catalog."default";
|
|
259
|
+
_family character varying(64) COLLATE pg_catalog."default";
|
|
233
260
|
BEGIN
|
|
234
261
|
begin
|
|
235
262
|
_resdesc_jsonb := _resdesc::jsonb;
|
|
263
|
+
_given := _resdesc_jsonb->'name'->0->>'given';
|
|
264
|
+
_family := _resdesc_jsonb->'name'->0->>'_family';
|
|
236
265
|
exception
|
|
237
266
|
when others then
|
|
238
267
|
raise exception 'Invalid JSON string: %', _resdesc;
|
|
@@ -259,8 +288,8 @@ BEGIN
|
|
|
259
288
|
|
|
260
289
|
update stsresource set validto = _now where oid = resoid;
|
|
261
290
|
|
|
262
|
-
insert into stsresource(resname, resdesc, resdesc_jsonb, vnum, dbaction, dbactionuser, validfrom)
|
|
263
|
-
values (_resname, _resdesc, _resdesc_jsonb, _resvnum+1, 2, _dbactionuser, _now)
|
|
291
|
+
insert into stsresource(resname, resdesc, resdesc_jsonb, given, family, vnum, dbaction, dbactionuser, validfrom)
|
|
292
|
+
values (_resname, _resdesc, _resdesc_jsonb, _given, _family, _resvnum+1, 2, _dbactionuser, _now)
|
|
264
293
|
RETURNING oid INTO newresoid;
|
|
265
294
|
|
|
266
295
|
update stsentity set resourceoid = newresoid where resourceoid = resoid;
|
|
@@ -310,8 +339,8 @@ BEGIN
|
|
|
310
339
|
|
|
311
340
|
update stsresource set validto = _now where oid = resoid;
|
|
312
341
|
|
|
313
|
-
insert into stsresource(resname, resdesc, resdesc_jsonb, vnum, dbaction, dbactionuser, validfrom)
|
|
314
|
-
select r.resname, r.resdesc, r.resdesc::jsonb, _resvnum+1, 3, _dbactionuser, _now
|
|
342
|
+
insert into stsresource(resname, resdesc, resdesc_jsonb, given, family, vnum, dbaction, dbactionuser, validfrom)
|
|
343
|
+
select r.resname, r.resdesc, r.resdesc::jsonb, resdesc_jsonb->'name'->0->>'given', resdesc_jsonb->'name'->0->>'family', _resvnum+1, 3, _dbactionuser, _now
|
|
315
344
|
from stsresource r where r.oid = resoid
|
|
316
345
|
RETURNING oid INTO newresoid;
|
|
317
346
|
|
|
@@ -365,8 +394,8 @@ BEGIN
|
|
|
365
394
|
|
|
366
395
|
update stsresource set validto = _now where oid = resoid;
|
|
367
396
|
|
|
368
|
-
insert into stsresource(resname, resdesc, resdesc_jsonb, vnum, dbaction, dbactionuser, validfrom)
|
|
369
|
-
select r.resname, r.resdesc, r.resdesc::jsonb, _resvnum+1, 3, _dbactionuser, _now
|
|
397
|
+
insert into stsresource(resname, resdesc, resdesc_jsonb, given, family, vnum, dbaction, dbactionuser, validfrom)
|
|
398
|
+
select r.resname, r.resdesc, r.resdesc::jsonb, resdesc_jsonb->'name'->0->>'given', resdesc_jsonb->'name'->0->>'family', _resvnum+1, 3, _dbactionuser, _now
|
|
370
399
|
from stsresource r where r.oid = resoid
|
|
371
400
|
RETURNING oid INTO newresoid;
|
|
372
401
|
|
|
@@ -827,7 +856,7 @@ ALTER FUNCTION public.delete_stsentity_latest(character varying, character varyi
|
|
|
827
856
|
OWNER TO postgres;
|
|
828
857
|
|
|
829
858
|
|
|
830
|
-
/* Create General Search Indexes
|
|
859
|
+
/* Create General Search Indexes */
|
|
831
860
|
|
|
832
861
|
/* GIN Index */
|
|
833
862
|
--drop index idx_stsresource_gin;
|
|
@@ -835,19 +864,27 @@ CREATE INDEX idx_stsresource_gin ON stsresource USING GIN (resdesc_jsonb);
|
|
|
835
864
|
|
|
836
865
|
/* btree indexes */
|
|
837
866
|
--drop index idx_stsresource_id;
|
|
867
|
+
--We don't use where here becuase all FHIR resources will have an id field
|
|
838
868
|
CREATE INDEX idx_stsresource_id ON stsresource ((resdesc_jsonb->>'id'));
|
|
839
869
|
|
|
870
|
+
-- Create Indexes for FHIR resources
|
|
871
|
+
|
|
840
872
|
--DROP INDEX idx_stsresource_given;
|
|
841
|
-
CREATE INDEX idx_stsresource_given
|
|
873
|
+
CREATE INDEX idx_stsresource_given
|
|
874
|
+
ON stsresource ((resdesc_jsonb->'name'->0->>'given'))
|
|
875
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person';
|
|
842
876
|
|
|
843
877
|
--drop index idx_stsresource_family;
|
|
844
|
-
CREATE INDEX idx_stsresource_family ON stsresource ((resdesc_jsonb->'name'->0->>'family'))
|
|
878
|
+
CREATE INDEX idx_stsresource_family ON stsresource ((resdesc_jsonb->'name'->0->>'family'))
|
|
879
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person';
|
|
845
880
|
|
|
846
881
|
--drop index idx_stsresource_text_div_01;
|
|
847
882
|
CREATE INDEX idx_stsresource_text_div_01
|
|
848
|
-
ON stsresource ((resdesc_jsonb->'text'->>'div'))
|
|
883
|
+
ON stsresource ((resdesc_jsonb->'text'->>'div'))
|
|
884
|
+
WHERE resdesc_jsonb->>'_resourceType' = 'Person';
|
|
849
885
|
|
|
850
886
|
/* btree indexes - alternate method - for queries, quotes will be need '"<search string>"' */
|
|
851
887
|
--drop index idx_stsresource_text_div_02;
|
|
852
888
|
CREATE INDEX idx_stsresource_text_div_02
|
|
853
|
-
ON stsresource ((resdesc_jsonb#>'{text,div}'))
|
|
889
|
+
ON stsresource ((resdesc_jsonb#>'{text,div}'))
|
|
890
|
+
WHERE (resdesc_jsonb#>'{_resourceType}')::text = '"Person"';
|