@andes/fhir 1.11.1 → 1.12.0-beta.2

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.
Files changed (94) hide show
  1. package/.circleci/config.yml +71 -68
  2. package/.editorconfig +13 -13
  3. package/.env.example +2 -0
  4. package/.github/labeler.yml +10 -10
  5. package/.github/pull_request_template.md +28 -28
  6. package/.github/workflows/build_test.yml +14 -14
  7. package/.github/workflows/has_conflicts.yml +13 -13
  8. package/.vscode/settings.json +2 -0
  9. package/CHANGELOG.md +312 -291
  10. package/LICENSE +674 -674
  11. package/README.md +2 -2
  12. package/coverage/clover.xml +198 -0
  13. package/coverage/coverage-final.json +5 -0
  14. package/coverage/lcov-report/base.css +224 -0
  15. package/coverage/lcov-report/block-navigation.js +87 -0
  16. package/coverage/lcov-report/config.ts.html +136 -0
  17. package/coverage/lcov-report/device.ts.html +193 -0
  18. package/coverage/lcov-report/favicon.png +0 -0
  19. package/coverage/lcov-report/helpers/index.html +116 -0
  20. package/coverage/lcov-report/helpers/patientFactory.ts.html +124 -0
  21. package/coverage/lcov-report/index.html +131 -0
  22. package/coverage/lcov-report/lib/config.ts.html +136 -0
  23. package/coverage/lcov-report/lib/device.ts.html +193 -0
  24. package/coverage/lcov-report/lib/index.html +146 -0
  25. package/coverage/lcov-report/lib/patient.ts.html +1267 -0
  26. package/coverage/lcov-report/patient.ts.html +1207 -0
  27. package/coverage/lcov-report/prettify.css +1 -0
  28. package/coverage/lcov-report/prettify.js +2 -0
  29. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  30. package/coverage/lcov-report/sorter.js +210 -0
  31. package/coverage/lcov.info +410 -0
  32. package/dist/index.js +51 -32
  33. package/dist/index.js.map +1 -1
  34. package/dist/src/data/patient.json +191 -185
  35. package/dist/src/helpers/patientFactory.js +31 -0
  36. package/dist/src/helpers/patientFactory.js.map +1 -0
  37. package/dist/src/lib/allergyIntolerance.js +39 -39
  38. package/dist/src/lib/allergyIntolerance.js.map +1 -1
  39. package/dist/src/lib/bundle.js +25 -22
  40. package/dist/src/lib/bundle.js.map +1 -1
  41. package/dist/src/lib/composition.js +151 -150
  42. package/dist/src/lib/composition.js.map +1 -1
  43. package/dist/src/lib/condition.js +79 -79
  44. package/dist/src/lib/condition.js.map +1 -1
  45. package/dist/src/lib/config.js +20 -22
  46. package/dist/src/lib/config.js.map +1 -1
  47. package/dist/src/lib/config.test.js +12 -12
  48. package/dist/src/lib/config.test.js.map +1 -1
  49. package/dist/src/lib/device.js +38 -38
  50. package/dist/src/lib/device.js.map +1 -1
  51. package/dist/src/lib/device.test.js +9 -9
  52. package/dist/src/lib/device.test.js.map +1 -1
  53. package/dist/src/lib/document-reference.js +106 -103
  54. package/dist/src/lib/document-reference.js.map +1 -1
  55. package/dist/src/lib/immunization.js +67 -67
  56. package/dist/src/lib/medication.js +64 -64
  57. package/dist/src/lib/medication.js.map +1 -1
  58. package/dist/src/lib/medicationRequest.js +102 -99
  59. package/dist/src/lib/medicationRequest.js.map +1 -1
  60. package/dist/src/lib/medicationStatement.js +55 -55
  61. package/dist/src/lib/medicationStatement.js.map +1 -1
  62. package/dist/src/lib/organization.js +90 -90
  63. package/dist/src/lib/organization.js.map +1 -1
  64. package/dist/src/lib/patient.js +378 -360
  65. package/dist/src/lib/patient.js.map +1 -1
  66. package/dist/src/lib/patient.test.js +78 -39
  67. package/dist/src/lib/patient.test.js.map +1 -1
  68. package/dist/src/lib/practitioner.js +160 -160
  69. package/dist/src/lib/practitioner.js.map +1 -1
  70. package/index.ts +31 -31
  71. package/jest.config.js +11 -11
  72. package/package.json +45 -54
  73. package/release.config.js +74 -0
  74. package/src/data/patient.json +190 -184
  75. package/src/helpers/patientFactory.ts +13 -0
  76. package/src/lib/allergyIntolerance.ts +36 -36
  77. package/src/lib/bundle.ts +19 -19
  78. package/src/lib/composition.ts +153 -153
  79. package/src/lib/condition.ts +80 -80
  80. package/src/lib/config.test.ts +13 -13
  81. package/src/lib/config.ts +17 -17
  82. package/src/lib/device.test.ts +9 -9
  83. package/src/lib/device.ts +36 -36
  84. package/src/lib/document-reference.ts +102 -102
  85. package/src/lib/immunization.ts +64 -64
  86. package/src/lib/medication.ts +61 -61
  87. package/src/lib/medicationRequest.ts +100 -100
  88. package/src/lib/medicationStatement.ts +52 -52
  89. package/src/lib/organization.ts +89 -89
  90. package/src/lib/patient.test.ts +62 -38
  91. package/src/lib/patient.ts +394 -374
  92. package/src/lib/practitioner.ts +157 -157
  93. package/tsconfig.test.json +17 -17
  94. package/tslint.json +138 -138
@@ -1,69 +1,72 @@
1
- version: 2
2
- jobs:
3
- install:
4
- working_directory: ~/fhir
5
- docker:
6
- - image: 'circleci/node:14'
7
- steps:
8
- - checkout
9
- - restore_cache:
10
- keys:
11
- - v2-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
12
- - v2-deps-{{ .Branch }}-
13
- - v2-deps-
14
- - run:
15
- name: Install dependencies
16
- command: npm ci
17
- - save_cache:
18
- key: v2-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
19
- paths:
20
- - ~/.npm
21
- - ~/.cache
22
- - persist_to_workspace:
23
- root: ~/
24
- paths:
25
- - .cache
26
- - fhir
27
- build:
28
- working_directory: ~/fhir
29
- docker:
30
- - image: circleci/node:14
31
- steps:
32
- - attach_workspace:
33
- at: ~/
34
- - run:
35
- name: lint
36
- command: npm run lint
37
- - run:
38
- name: npm-install
39
- command: npm install
40
- deploy:
41
- working_directory: ~/fhir
42
- docker:
43
- - image: 'circleci/node:14'
44
- steps:
45
- - attach_workspace:
46
- at: ~/
47
- - run: npx semantic-release
48
-
49
- workflows:
50
- version: 2
51
- prepare_and_release:
52
- jobs:
53
- - install
54
- - build:
55
- requires:
56
- - install
57
- - request-deploy:
58
- type: approval
59
- requires:
60
- - build
61
- filters:
62
- branches:
63
- only: master
64
- - deploy:
65
- requires:
66
- - request-deploy
67
- filters:
68
- branches:
1
+ version: 2
2
+ jobs:
3
+ install:
4
+ working_directory: ~/fhir
5
+ docker:
6
+ - image: 'cimg/node:22.11'
7
+ steps:
8
+ - run:
9
+ name: Use HTTPS for GitHub
10
+ command: git config --global url."https://github.com/".insteadOf "git@github.com:"
11
+ - checkout
12
+ - restore_cache:
13
+ keys:
14
+ - v2-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
15
+ - v2-deps-{{ .Branch }}-
16
+ - v2-deps-
17
+ - run:
18
+ name: Install dependencies
19
+ command: npm ci
20
+ - save_cache:
21
+ key: v2-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
22
+ paths:
23
+ - ~/.npm
24
+ - ~/.cache
25
+ - persist_to_workspace:
26
+ root: ~/
27
+ paths:
28
+ - .cache
29
+ - fhir
30
+ build:
31
+ working_directory: ~/fhir
32
+ docker:
33
+ - image: cimg/node:22.11
34
+ steps:
35
+ - attach_workspace:
36
+ at: ~/
37
+ - run:
38
+ name: lint
39
+ command: npm run lint
40
+ - run:
41
+ name: npm-install
42
+ command: npm install
43
+ deploy:
44
+ working_directory: ~/fhir
45
+ docker:
46
+ - image: 'cimg/node:22.11'
47
+ steps:
48
+ - attach_workspace:
49
+ at: ~/
50
+ - run: npx semantic-release
51
+
52
+ workflows:
53
+ version: 2
54
+ prepare_and_release:
55
+ jobs:
56
+ - install
57
+ - build:
58
+ requires:
59
+ - install
60
+ - request-deploy:
61
+ type: approval
62
+ requires:
63
+ - build
64
+ filters:
65
+ branches:
66
+ only: master
67
+ - deploy:
68
+ requires:
69
+ - request-deploy
70
+ filters:
71
+ branches:
69
72
  only: master
package/.editorconfig CHANGED
@@ -1,14 +1,14 @@
1
- # Editor configuration, see http://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- end_of_line = lf
9
- insert_final_newline = true
10
- trim_trailing_whitespace = true
11
-
12
- [*.md]
13
- max_line_length = 0
1
+ # Editor configuration, see http://editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ indent_size = 2
8
+ end_of_line = lf
9
+ insert_final_newline = true
10
+ trim_trailing_whitespace = true
11
+
12
+ [*.md]
13
+ max_line_length = 0
14
14
  trim_trailing_whitespace = false
package/.env.example ADDED
@@ -0,0 +1,2 @@
1
+ GITHUB_TOKEN=
2
+ NPM_TOKEN=
@@ -1,11 +1,11 @@
1
- name: "Pull Request Labeler"
2
- on:
3
- - pull_request
4
-
5
- jobs:
6
- triage:
7
- runs-on: ubuntu-latest
8
- steps:
9
- - uses: actions/labeler@v2
10
- with:
1
+ name: "Pull Request Labeler"
2
+ on:
3
+ - pull_request
4
+
5
+ jobs:
6
+ triage:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/labeler@v2
10
+ with:
11
11
  repo-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,28 +1,28 @@
1
- <!--
2
-
3
- PASOS PARA REGISTRAR UN PULL REQUEST
4
- ____________________________________
5
- -->
6
- ### Requerimiento
7
- <!-- URL de la User Story, referencia al issue (#1111) o breve descripcion del requerimiento -->
8
-
9
- ### Funcionalidad desarrollada
10
- <!-- Describir que se desarrollo -->
11
- 1.
12
- 2.
13
- 3.
14
-
15
-
16
- ### UserStories llegó a completarse
17
- <!-- Marca con una X la casilla correcta-->
18
- - [ ] Si
19
- - [ ] No
20
-
21
- <!-- Agregar captura de pantalla, si fuera relevante -->
22
-
23
-
24
- <!-- Código relevante
25
- ```
26
- (pegar código aquí)
27
- ```
28
- -->
1
+ <!--
2
+
3
+ PASOS PARA REGISTRAR UN PULL REQUEST
4
+ ____________________________________
5
+ -->
6
+ ### Requerimiento
7
+ <!-- URL de la User Story, referencia al issue (#1111) o breve descripcion del requerimiento -->
8
+
9
+ ### Funcionalidad desarrollada
10
+ <!-- Describir que se desarrollo -->
11
+ 1.
12
+ 2.
13
+ 3.
14
+
15
+
16
+ ### UserStories llegó a completarse
17
+ <!-- Marca con una X la casilla correcta-->
18
+ - [ ] Si
19
+ - [ ] No
20
+
21
+ <!-- Agregar captura de pantalla, si fuera relevante -->
22
+
23
+
24
+ <!-- Código relevante
25
+ ```
26
+ (pegar código aquí)
27
+ ```
28
+ -->
@@ -1,14 +1,14 @@
1
- name: BUILD AND TEST
2
- on: [push]
3
- jobs:
4
- build:
5
- runs-on: ubuntu-latest
6
- steps:
7
- - uses: actions/checkout@v1
8
- - name: Use Node.js
9
- uses: actions/setup-node@v1
10
- with:
11
- node-version: '10.x'
12
- - run: npm ci
13
- - run: npm run lint
14
- - run: npm test
1
+ name: BUILD AND TEST
2
+ on: [push]
3
+ jobs:
4
+ build:
5
+ runs-on: ubuntu-22.04
6
+ steps:
7
+ - uses: actions/checkout@v1
8
+ - name: Use Node.js
9
+ uses: actions/setup-node@v1
10
+ with:
11
+ node-version: '22.x'
12
+ - run: npm ci
13
+ - run: npm run lint
14
+ - run: npm test
@@ -1,13 +1,13 @@
1
- on:
2
- workflow_dispatch:
3
- push:
4
- branches:
5
- - master
6
- jobs:
7
- triage:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: mschilde/auto-label-merge-conflicts@master
11
- with:
12
- CONFLICT_LABEL_NAME: "has conflicts"
13
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1
+ on:
2
+ workflow_dispatch:
3
+ push:
4
+ branches:
5
+ - master
6
+ jobs:
7
+ triage:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: mschilde/auto-label-merge-conflicts@master
11
+ with:
12
+ CONFLICT_LABEL_NAME: "has conflicts"
13
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,2 @@
1
+ {
2
+ }