@nsshunt/stsdatamanagement 1.18.113 → 1.18.115
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/db-scripts/builddb.sql +22 -9
- package/package.json +16 -17
package/db-scripts/builddb.sql
CHANGED
|
@@ -856,7 +856,7 @@ ALTER FUNCTION public.delete_stsentity_latest(character varying, character varyi
|
|
|
856
856
|
|
|
857
857
|
-------[ Indexes for Search Functions ]---------------------------------------------------------------------------------------------------------------
|
|
858
858
|
|
|
859
|
-
/* Create General Search Indexes */
|
|
859
|
+
/* Create General Search Indexes, some are partial (WHERE clause) indexes */
|
|
860
860
|
|
|
861
861
|
/* GIN Index */
|
|
862
862
|
--drop index idx_stsresource_gin;
|
|
@@ -865,39 +865,52 @@ CREATE INDEX idx_stsresource_gin ON stsresource USING GIN (resdesc_jsonb);
|
|
|
865
865
|
/* btree indexes */
|
|
866
866
|
--drop index idx_stsresource_id;
|
|
867
867
|
--We don't use where here becuase all FHIR resources will have an id field
|
|
868
|
-
CREATE INDEX idx_stsresource_id
|
|
868
|
+
CREATE INDEX idx_stsresource_id
|
|
869
|
+
ON stsresource
|
|
870
|
+
((resdesc_jsonb->>'id'));
|
|
869
871
|
|
|
870
872
|
-- Create Indexes for FHIR resources
|
|
871
873
|
|
|
872
|
-
--DROP INDEX idx_stsresource_given;
|
|
874
|
+
-- DROP INDEX idx_stsresource_given;
|
|
873
875
|
CREATE INDEX idx_stsresource_given
|
|
874
876
|
ON stsresource
|
|
875
877
|
((resdesc_jsonb->'name'->0->'given'->>0))
|
|
876
|
-
WHERE
|
|
878
|
+
WHERE
|
|
879
|
+
resdesc_jsonb->>'_resourceType' = 'Person'
|
|
880
|
+
AND validto IS NULL;
|
|
877
881
|
|
|
878
|
-
--
|
|
882
|
+
-- DROP INDEX idx_stsresource_family;
|
|
879
883
|
CREATE INDEX idx_stsresource_family
|
|
880
884
|
ON stsresource
|
|
881
885
|
((resdesc_jsonb->'name'->0->>'family'))
|
|
882
|
-
WHERE
|
|
886
|
+
WHERE
|
|
887
|
+
resdesc_jsonb->>'_resourceType' = 'Person'
|
|
888
|
+
AND validto IS NULL;
|
|
883
889
|
|
|
890
|
+
-- DROP INDEX idx_stsresource_given_family
|
|
884
891
|
CREATE INDEX idx_stsresource_given_family
|
|
885
892
|
ON stsresource (
|
|
886
893
|
(resdesc_jsonb->'name'->0->'given'->>0),
|
|
887
894
|
(resdesc_jsonb->'name'->0->>'family')
|
|
888
895
|
)
|
|
889
|
-
WHERE
|
|
896
|
+
WHERE
|
|
897
|
+
resdesc_jsonb->>'_resourceType' = 'Person'
|
|
898
|
+
AND validto IS NULL;
|
|
890
899
|
|
|
891
900
|
--drop index idx_stsresource_text_div_01;
|
|
892
901
|
CREATE INDEX idx_stsresource_text_div_01
|
|
893
902
|
ON stsresource ((resdesc_jsonb->'text'->>'div'))
|
|
894
|
-
WHERE
|
|
903
|
+
WHERE
|
|
904
|
+
resdesc_jsonb->>'_resourceType' = 'Person'
|
|
905
|
+
AND validto IS NULL;
|
|
895
906
|
|
|
896
907
|
/* btree indexes - alternate method - for queries, quotes will be need '"<search string>"' */
|
|
897
908
|
--drop index idx_stsresource_text_div_02;
|
|
898
909
|
CREATE INDEX idx_stsresource_text_div_02
|
|
899
910
|
ON stsresource ((resdesc_jsonb#>'{text,div}'))
|
|
900
|
-
WHERE
|
|
911
|
+
WHERE
|
|
912
|
+
(resdesc_jsonb#>'{_resourceType}')::text = '"Person"'
|
|
913
|
+
AND validto IS NULL;
|
|
901
914
|
|
|
902
915
|
-------[ Search Functions ]---------------------------------------------------------------------------------------------------------------
|
|
903
916
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nsshunt/stsdatamanagement",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.115",
|
|
4
4
|
"description": "STS Data Management Modules, Utilities and Services",
|
|
5
5
|
"main": "./dist/dbaccess.js",
|
|
6
6
|
"types": "./types/dbaccess.d.ts",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist",
|
|
9
9
|
"types",
|
|
10
|
-
"db-scripts"
|
|
10
|
+
"db-scripts",
|
|
11
|
+
"LICENSE",
|
|
12
|
+
"README.md"
|
|
11
13
|
],
|
|
12
14
|
"dependencies": {
|
|
13
|
-
"@aws-sdk/client-dynamodb": "^3.
|
|
14
|
-
"@aws-sdk/lib-dynamodb": "^3.
|
|
15
|
-
"@nsshunt/stsconfig": "^1.27.
|
|
16
|
-
"@nsshunt/stsutils": "^1.19.
|
|
15
|
+
"@aws-sdk/client-dynamodb": "^3.738.0",
|
|
16
|
+
"@aws-sdk/lib-dynamodb": "^3.738.0",
|
|
17
|
+
"@nsshunt/stsconfig": "^1.27.14",
|
|
18
|
+
"@nsshunt/stsutils": "^1.19.24",
|
|
17
19
|
"axios": "^1.7.9",
|
|
18
20
|
"chalk": "^4.1.2",
|
|
19
21
|
"cli-progress": "^3.12.0",
|
|
@@ -28,26 +30,23 @@
|
|
|
28
30
|
"uuid": "^11.0.5",
|
|
29
31
|
"winston": "^3.17.0"
|
|
30
32
|
},
|
|
31
|
-
"standard": {
|
|
32
|
-
"parser": "@babel/eslint-parser"
|
|
33
|
-
},
|
|
34
33
|
"devDependencies": {
|
|
35
34
|
"@types/cli-progress": "^3.11.6",
|
|
36
|
-
"@types/node": "^22.
|
|
37
|
-
"@types/pg": "^8.11.
|
|
35
|
+
"@types/node": "^22.13.0",
|
|
36
|
+
"@types/pg": "^8.11.11",
|
|
38
37
|
"@types/pg-copy-streams": "^1.2.5",
|
|
39
38
|
"@types/prompts": "^2.4.9",
|
|
40
39
|
"@types/uuid": "^10.0.0",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
42
|
-
"@typescript-eslint/parser": "^8.
|
|
43
|
-
"eslint": "^9.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^8.22.0",
|
|
41
|
+
"@typescript-eslint/parser": "^8.22.0",
|
|
42
|
+
"eslint": "^9.19.0",
|
|
44
43
|
"globals": "^15.14.0",
|
|
45
44
|
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
46
45
|
"rollup-plugin-visualizer": "^5.14.0",
|
|
47
|
-
"testcontainers": "^10.
|
|
46
|
+
"testcontainers": "^10.17.2",
|
|
48
47
|
"typescript": "^5.7.3",
|
|
49
|
-
"vite": "^6.0.
|
|
50
|
-
"vitest": "^
|
|
48
|
+
"vite": "^6.0.11",
|
|
49
|
+
"vitest": "^3.0.4"
|
|
51
50
|
},
|
|
52
51
|
"scripts": {
|
|
53
52
|
"lint": "eslint .",
|