@andes/fhir 1.12.0 → 1.12.1-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 (127) hide show
  1. package/LICENSE +674 -674
  2. package/README.md +2 -2
  3. package/{src → dist}/data/patient.json +192 -192
  4. package/dist/helpers/patientFactory.d.ts +26 -0
  5. package/dist/{src/helpers → helpers}/patientFactory.js +35 -31
  6. package/dist/index.d.ts +15 -0
  7. package/dist/index.js +55 -52
  8. package/dist/lib/allergyIntolerance.d.ts +29 -0
  9. package/dist/{src/lib → lib}/allergyIntolerance.js +39 -40
  10. package/dist/lib/bundle.d.ts +14 -0
  11. package/dist/{src/lib → lib}/bundle.js +25 -26
  12. package/dist/lib/composition.d.ts +47 -0
  13. package/dist/{src/lib → lib}/composition.js +152 -152
  14. package/dist/lib/condition.d.ts +53 -0
  15. package/dist/{src/lib → lib}/condition.js +79 -80
  16. package/dist/lib/config.d.ts +9 -0
  17. package/dist/{src/lib → lib}/config.js +27 -21
  18. package/dist/lib/config.test.d.ts +1 -0
  19. package/dist/lib/config.test.js +19 -0
  20. package/dist/lib/device.d.ts +22 -0
  21. package/dist/{src/lib → lib}/device.js +38 -39
  22. package/dist/lib/device.test.d.ts +1 -0
  23. package/dist/lib/device.test.js +9 -0
  24. package/dist/lib/document-reference.d.ts +71 -0
  25. package/dist/{src/lib → lib}/document-reference.js +106 -107
  26. package/dist/lib/immunization.d.ts +44 -0
  27. package/dist/{src/lib → lib}/immunization.js +67 -68
  28. package/dist/lib/medication.d.ts +25 -0
  29. package/{src/lib/medication.ts → dist/lib/medication.js} +64 -61
  30. package/dist/lib/medicationRequest.d.ts +42 -0
  31. package/{src/lib/medicationRequest.ts → dist/lib/medicationRequest.js} +103 -100
  32. package/dist/lib/medicationStatement.d.ts +47 -0
  33. package/dist/{src/lib → lib}/medicationStatement.js +55 -56
  34. package/dist/lib/organization.d.ts +6 -0
  35. package/dist/lib/organization.js +93 -0
  36. package/dist/lib/patient.d.ts +14 -0
  37. package/dist/lib/patient.js +465 -0
  38. package/dist/lib/patient.test.d.ts +1 -0
  39. package/dist/{src/lib → lib}/patient.test.js +132 -113
  40. package/dist/lib/practitioner.d.ts +6 -0
  41. package/dist/lib/practitioner.js +186 -0
  42. package/dist/types/andes/organization.types.d.ts +39 -0
  43. package/dist/types/andes/organization.types.js +2 -0
  44. package/dist/types/andes/patient.types.d.ts +57 -0
  45. package/dist/types/andes/patient.types.js +2 -0
  46. package/dist/types/andes/practitioner.types.d.ts +72 -0
  47. package/dist/types/andes/practitioner.types.js +3 -0
  48. package/package.json +56 -45
  49. package/.circleci/config.yml +0 -72
  50. package/.editorconfig +0 -14
  51. package/.env.example +0 -2
  52. package/.gitattributes +0 -1
  53. package/.github/CODEOWNERS +0 -1
  54. package/.github/labeler.yml +0 -11
  55. package/.github/pull_request_template.md +0 -28
  56. package/.github/workflows/build_test.yml +0 -14
  57. package/.github/workflows/has_conflicts.yml +0 -13
  58. package/.vscode/settings.json +0 -2
  59. package/CHANGELOG.md +0 -351
  60. package/coverage/clover.xml +0 -209
  61. package/coverage/coverage-final.json +0 -5
  62. package/coverage/lcov-report/base.css +0 -224
  63. package/coverage/lcov-report/block-navigation.js +0 -87
  64. package/coverage/lcov-report/config.ts.html +0 -136
  65. package/coverage/lcov-report/device.ts.html +0 -193
  66. package/coverage/lcov-report/favicon.png +0 -0
  67. package/coverage/lcov-report/helpers/index.html +0 -116
  68. package/coverage/lcov-report/helpers/patientFactory.ts.html +0 -124
  69. package/coverage/lcov-report/index.html +0 -131
  70. package/coverage/lcov-report/lib/config.ts.html +0 -136
  71. package/coverage/lcov-report/lib/device.ts.html +0 -193
  72. package/coverage/lcov-report/lib/index.html +0 -146
  73. package/coverage/lcov-report/lib/patient.ts.html +0 -1318
  74. package/coverage/lcov-report/patient.ts.html +0 -1207
  75. package/coverage/lcov-report/prettify.css +0 -1
  76. package/coverage/lcov-report/prettify.js +0 -2
  77. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  78. package/coverage/lcov-report/sorter.js +0 -210
  79. package/coverage/lcov.info +0 -425
  80. package/dist/index.js.map +0 -1
  81. package/dist/src/data/patient.json +0 -192
  82. package/dist/src/helpers/patientFactory.js.map +0 -1
  83. package/dist/src/lib/allergyIntolerance.js.map +0 -1
  84. package/dist/src/lib/bundle.js.map +0 -1
  85. package/dist/src/lib/composition.js.map +0 -1
  86. package/dist/src/lib/condition.js.map +0 -1
  87. package/dist/src/lib/config.js.map +0 -1
  88. package/dist/src/lib/config.test.js +0 -13
  89. package/dist/src/lib/config.test.js.map +0 -1
  90. package/dist/src/lib/device.js.map +0 -1
  91. package/dist/src/lib/device.test.js +0 -10
  92. package/dist/src/lib/device.test.js.map +0 -1
  93. package/dist/src/lib/document-reference.js.map +0 -1
  94. package/dist/src/lib/immunization.js.map +0 -1
  95. package/dist/src/lib/medication.js +0 -65
  96. package/dist/src/lib/medication.js.map +0 -1
  97. package/dist/src/lib/medicationRequest.js +0 -103
  98. package/dist/src/lib/medicationRequest.js.map +0 -1
  99. package/dist/src/lib/medicationStatement.js.map +0 -1
  100. package/dist/src/lib/organization.js +0 -91
  101. package/dist/src/lib/organization.js.map +0 -1
  102. package/dist/src/lib/patient.js +0 -397
  103. package/dist/src/lib/patient.js.map +0 -1
  104. package/dist/src/lib/patient.test.js.map +0 -1
  105. package/dist/src/lib/practitioner.js +0 -161
  106. package/dist/src/lib/practitioner.js.map +0 -1
  107. package/index.ts +0 -30
  108. package/jest.config.js +0 -12
  109. package/release.config.js +0 -74
  110. package/src/helpers/patientFactory.ts +0 -13
  111. package/src/lib/allergyIntolerance.ts +0 -36
  112. package/src/lib/bundle.ts +0 -19
  113. package/src/lib/composition.ts +0 -153
  114. package/src/lib/condition.ts +0 -80
  115. package/src/lib/config.test.ts +0 -13
  116. package/src/lib/config.ts +0 -17
  117. package/src/lib/device.test.ts +0 -9
  118. package/src/lib/device.ts +0 -36
  119. package/src/lib/document-reference.ts +0 -102
  120. package/src/lib/immunization.ts +0 -64
  121. package/src/lib/medicationStatement.ts +0 -52
  122. package/src/lib/organization.ts +0 -89
  123. package/src/lib/patient.test.ts +0 -101
  124. package/src/lib/patient.ts +0 -411
  125. package/src/lib/practitioner.ts +0 -157
  126. package/tsconfig.test.json +0 -18
  127. package/tslint.json +0 -139
package/README.md CHANGED
@@ -1,2 +1,2 @@
1
- # FHIR
2
- Paquete Fhir para Andes
1
+ # FHIR
2
+ Paquete Fhir para Andes
@@ -1,192 +1,192 @@
1
- {
2
- "_id": "58d30d6fgbb1a96b254d9877",
3
- "entidadesValidadoras": [
4
- "RENAPER",
5
- "Sisa"
6
- ],
7
- "documento": "42910660",
8
- "apellido": "PERINGA PONCE",
9
- "nombre": "HUGO AGUSTIN",
10
- "sexo": "masculino",
11
- "fechaNacimiento": "1979-11-14T03:00:00.000-03:00",
12
- "estado": "validado",
13
- "genero": "masculino",
14
- "financiador": [
15
- {
16
- "codigoPuco": 921001,
17
- "nombre": "O.S.P. NEUQUEN",
18
- "financiador": "O.S.P. NEUQUEN"
19
- },
20
- {
21
- "codigoPuco": 921001,
22
- "nombre": "O.S.P. NEUQUEN",
23
- "financiador": "O.S.P. NEUQUEN"
24
- }
25
- ],
26
- "relaciones": [
27
- {
28
- "_id": "5b92dec9646d99436065cbfc",
29
- "relacion": {
30
- "_id": "59247c391ebf0273353b23c0",
31
- "nombre": "hijo/a",
32
- "opuesto": "progenitor/a"
33
- },
34
- "referencia": "5b92de583173b053ae88f2d0",
35
- "nombre": "JOSEFINA",
36
- "apellido": "PERINGA PONCE",
37
- "documento": "333333333",
38
- "fotoId": "5f9072d00254f253d9c7dd54"
39
- },
40
- {
41
- "_id": "5b92dec9646d99436065cbfa",
42
- "relacion": {
43
- "_id": "59247c391ebf0273353b23c0",
44
- "nombre": "hijo/a",
45
- "opuesto": "progenitor/a"
46
- },
47
- "referencia": "5b9287f10394a225c25a150b",
48
- "nombre": "IGNACIO",
49
- "apellido": "PERINGA PONCE",
50
- "documento": "222222222",
51
- "fotoId": "5f9072d00254f253d9c7dd2c"
52
- },
53
- {
54
- "_id": "5f00d31e044ef317c36fd4f8",
55
- "relacion": {
56
- "_id": "59247c391ebf0273353b23c0",
57
- "nombre": "hijo/a",
58
- "opuesto": "progenitor/a"
59
- },
60
- "referencia": "5f00d2f7acfe3a7e46a88227",
61
- "nombre": "JUAN CRUZ",
62
- "apellido": "PERINGA PONCE",
63
- "documento": "11111111",
64
- "fotoId": "5f9078ff0254f253d9dc7212"
65
- },
66
- {
67
- "_id": "5f09f00d5cec191aa5908457",
68
- "relacion": {
69
- "_id": "59247e1c1ebf0273353b23c5",
70
- "nombre": "otro",
71
- "opuesto": "otro"
72
- },
73
- "referencia": "59cb176acd21ce293061b67b",
74
- "nombre": "FLORENCIA INES",
75
- "apellido": "YAMIL",
76
- "documento": "15365478",
77
- "fotoId": "5f9072b40254f253d9c79556"
78
- }
79
- ],
80
- "direccion": [
81
- {
82
- "geoReferencia": [
83
- -38.9305707,
84
- -68.0839758
85
- ],
86
- "activo": true,
87
- "_id": "58d90d6f0bb1a96b254d9878",
88
- "valor": "Enrique Santos Discepolo 1856",
89
- "codigoPostal": "8300",
90
- "ubicacion": {
91
- "_id": "58d90d6f0bb1a96b254d9879",
92
- "pais": {
93
- "_id": "57f3b5c469fe79a598e6281f",
94
- "nombre": "Argentina"
95
- },
96
- "provincia": {
97
- "_id": "57f3f3aacebd681cc2014c53",
98
- "nombre": "Neuquén"
99
- },
100
- "localidad": {
101
- "_id": "57f538a472325875a199a82d",
102
- "nombre": "NEUQUEN"
103
- },
104
- "barrio": null
105
- },
106
- "ranking": 0,
107
- "ultimaActualizacion": "2017-03-27T10:02:16.809-03:00"
108
- },
109
- {
110
- "geoReferencia": null,
111
- "activo": true,
112
- "_id": "6046105ba4e2d85f81ad60f7",
113
- "valor": "NORDENSTROM 1898 0 0",
114
- "codigoPostal": "8300",
115
- "ranking": 1,
116
- "ubicacion": {
117
- "_id": "6046105ba4e2d85f81ad60f8",
118
- "pais": {
119
- "_id": "57f3b5c469fe79a598e6281f",
120
- "nombre": "Argentina"
121
- },
122
- "provincia": {
123
- "_id": "57f3f3aacebd681cc2014c53",
124
- "nombre": "Neuquén"
125
- },
126
- "localidad": {
127
- "_id": "57f538a472325875a199a82d",
128
- "nombre": "Neuquén"
129
- },
130
- "barrio": null
131
- },
132
- "ultimaActualizacion": "2021-03-08T08:54:04.089-03:00"
133
- }
134
- ],
135
- "contacto": [
136
- {
137
- "activo": true,
138
- "_id": "5cabf8cc129519c9cd5bf6f2",
139
- "tipo": "celular",
140
- "valor": "4462221"
141
- },
142
- {
143
- "activo": true,
144
- "_id": "5cabf8cc129519c9cd5bf6f1",
145
- "tipo": "email",
146
- "valor": "hugoperingaponce@gmail.com"
147
- }
148
- ],
149
- "identificadores": [
150
- {
151
- "entidad": "RENAPER",
152
- "valor": "241654536"
153
- }
154
- ],
155
- "estadoCivil": "soltero",
156
- "reportarError": false,
157
- "scan": "27381849",
158
- "carpetaEfectores": [
159
- {
160
- "_id": "5992e06a0e3f6446112e9bd5",
161
- "organizacion": {
162
- "_id": "59650203d03019f919ea31ed",
163
- "nombre": "CENTRO DE SALUD PARQUE INDUSTRIAL"
164
- },
165
- "nroCarpeta": ""
166
- },
167
- {
168
- "_id": "5b57565dc0202168d3d5762d",
169
- "organizacion": {
170
- "_id": "57e9670e52df311059bc8964",
171
- "nombre": "HOSPITAL PROVINCIAL NEUQUEN - DR. EDUARDO CASTRO RENDON"
172
- },
173
- "nroCarpeta": "PDR27381849"
174
- }
175
- ],
176
- "notas": [],
177
- "cuil": "23273818499",
178
- "foto": null,
179
- "activo": true,
180
- "notaError": "",
181
- "tipoIdentificacion": null,
182
- "numeroIdentificacion": null,
183
- "fotoId": "6046105c18944f849e9fe315",
184
- "documentos": [],
185
- "fechaFallecimiento": null,
186
- "createdBy": {
187
- "organizacion": {
188
- "id": "50580352367779",
189
- "nombre": "LABORATORIO RAÑA - SERVICIOS MEDICOS"
190
- }
191
- }
192
- }
1
+ {
2
+ "_id": "58d30d6fgbb1a96b254d9877",
3
+ "entidadesValidadoras": [
4
+ "RENAPER",
5
+ "Sisa"
6
+ ],
7
+ "documento": "42910660",
8
+ "apellido": "PERINGA PONCE",
9
+ "nombre": "HUGO AGUSTIN",
10
+ "sexo": "masculino",
11
+ "fechaNacimiento": "1979-11-14T03:00:00.000-03:00",
12
+ "estado": "validado",
13
+ "genero": "masculino",
14
+ "financiador": [
15
+ {
16
+ "codigoPuco": 921001,
17
+ "nombre": "O.S.P. NEUQUEN",
18
+ "financiador": "O.S.P. NEUQUEN"
19
+ },
20
+ {
21
+ "codigoPuco": 921001,
22
+ "nombre": "O.S.P. NEUQUEN",
23
+ "financiador": "O.S.P. NEUQUEN"
24
+ }
25
+ ],
26
+ "relaciones": [
27
+ {
28
+ "_id": "5b92dec9646d99436065cbfc",
29
+ "relacion": {
30
+ "_id": "59247c391ebf0273353b23c0",
31
+ "nombre": "hijo/a",
32
+ "opuesto": "progenitor/a"
33
+ },
34
+ "referencia": "5b92de583173b053ae88f2d0",
35
+ "nombre": "JOSEFINA",
36
+ "apellido": "PERINGA PONCE",
37
+ "documento": "333333333",
38
+ "fotoId": "5f9072d00254f253d9c7dd54"
39
+ },
40
+ {
41
+ "_id": "5b92dec9646d99436065cbfa",
42
+ "relacion": {
43
+ "_id": "59247c391ebf0273353b23c0",
44
+ "nombre": "hijo/a",
45
+ "opuesto": "progenitor/a"
46
+ },
47
+ "referencia": "5b9287f10394a225c25a150b",
48
+ "nombre": "IGNACIO",
49
+ "apellido": "PERINGA PONCE",
50
+ "documento": "222222222",
51
+ "fotoId": "5f9072d00254f253d9c7dd2c"
52
+ },
53
+ {
54
+ "_id": "5f00d31e044ef317c36fd4f8",
55
+ "relacion": {
56
+ "_id": "59247c391ebf0273353b23c0",
57
+ "nombre": "hijo/a",
58
+ "opuesto": "progenitor/a"
59
+ },
60
+ "referencia": "5f00d2f7acfe3a7e46a88227",
61
+ "nombre": "JUAN CRUZ",
62
+ "apellido": "PERINGA PONCE",
63
+ "documento": "11111111",
64
+ "fotoId": "5f9078ff0254f253d9dc7212"
65
+ },
66
+ {
67
+ "_id": "5f09f00d5cec191aa5908457",
68
+ "relacion": {
69
+ "_id": "59247e1c1ebf0273353b23c5",
70
+ "nombre": "otro",
71
+ "opuesto": "otro"
72
+ },
73
+ "referencia": "59cb176acd21ce293061b67b",
74
+ "nombre": "FLORENCIA INES",
75
+ "apellido": "YAMIL",
76
+ "documento": "15365478",
77
+ "fotoId": "5f9072b40254f253d9c79556"
78
+ }
79
+ ],
80
+ "direccion": [
81
+ {
82
+ "geoReferencia": [
83
+ -38.9305707,
84
+ -68.0839758
85
+ ],
86
+ "activo": true,
87
+ "_id": "58d90d6f0bb1a96b254d9878",
88
+ "valor": "Enrique Santos Discepolo 1856",
89
+ "codigoPostal": "8300",
90
+ "ubicacion": {
91
+ "_id": "58d90d6f0bb1a96b254d9879",
92
+ "pais": {
93
+ "_id": "57f3b5c469fe79a598e6281f",
94
+ "nombre": "Argentina"
95
+ },
96
+ "provincia": {
97
+ "_id": "57f3f3aacebd681cc2014c53",
98
+ "nombre": "Neuquén"
99
+ },
100
+ "localidad": {
101
+ "_id": "57f538a472325875a199a82d",
102
+ "nombre": "NEUQUEN"
103
+ },
104
+ "barrio": null
105
+ },
106
+ "ranking": 0,
107
+ "ultimaActualizacion": "2017-03-27T10:02:16.809-03:00"
108
+ },
109
+ {
110
+ "geoReferencia": null,
111
+ "activo": true,
112
+ "_id": "6046105ba4e2d85f81ad60f7",
113
+ "valor": "NORDENSTROM 1898 0 0",
114
+ "codigoPostal": "8300",
115
+ "ranking": 1,
116
+ "ubicacion": {
117
+ "_id": "6046105ba4e2d85f81ad60f8",
118
+ "pais": {
119
+ "_id": "57f3b5c469fe79a598e6281f",
120
+ "nombre": "Argentina"
121
+ },
122
+ "provincia": {
123
+ "_id": "57f3f3aacebd681cc2014c53",
124
+ "nombre": "Neuquén"
125
+ },
126
+ "localidad": {
127
+ "_id": "57f538a472325875a199a82d",
128
+ "nombre": "Neuquén"
129
+ },
130
+ "barrio": null
131
+ },
132
+ "ultimaActualizacion": "2021-03-08T08:54:04.089-03:00"
133
+ }
134
+ ],
135
+ "contacto": [
136
+ {
137
+ "activo": true,
138
+ "_id": "5cabf8cc129519c9cd5bf6f2",
139
+ "tipo": "celular",
140
+ "valor": "4462221"
141
+ },
142
+ {
143
+ "activo": true,
144
+ "_id": "5cabf8cc129519c9cd5bf6f1",
145
+ "tipo": "email",
146
+ "valor": "hugoperingaponce@gmail.com"
147
+ }
148
+ ],
149
+ "identificadores": [
150
+ {
151
+ "entidad": "RENAPER",
152
+ "valor": "241654536"
153
+ }
154
+ ],
155
+ "estadoCivil": "soltero",
156
+ "reportarError": false,
157
+ "scan": "27381849",
158
+ "carpetaEfectores": [
159
+ {
160
+ "_id": "5992e06a0e3f6446112e9bd5",
161
+ "organizacion": {
162
+ "_id": "59650203d03019f919ea31ed",
163
+ "nombre": "CENTRO DE SALUD PARQUE INDUSTRIAL"
164
+ },
165
+ "nroCarpeta": ""
166
+ },
167
+ {
168
+ "_id": "5b57565dc0202168d3d5762d",
169
+ "organizacion": {
170
+ "_id": "57e9670e52df311059bc8964",
171
+ "nombre": "HOSPITAL PROVINCIAL NEUQUEN - DR. EDUARDO CASTRO RENDON"
172
+ },
173
+ "nroCarpeta": "PDR27381849"
174
+ }
175
+ ],
176
+ "notas": [],
177
+ "cuil": "23273818499",
178
+ "foto": null,
179
+ "activo": true,
180
+ "notaError": "",
181
+ "tipoIdentificacion": null,
182
+ "numeroIdentificacion": null,
183
+ "fotoId": "6046105c18944f849e9fe315",
184
+ "documentos": [],
185
+ "fechaFallecimiento": null,
186
+ "createdBy": {
187
+ "organizacion": {
188
+ "id": "50580352367779",
189
+ "nombre": "LABORATORIO RAÑA - SERVICIOS MEDICOS"
190
+ }
191
+ }
192
+ }
@@ -0,0 +1,26 @@
1
+ import { AndesPatient } from '../types/andes/patient.types';
2
+ export type PartialDeep<T> = {
3
+ [K in keyof T]?: T[K] extends object ? PartialDeep<T[K]> : T[K];
4
+ };
5
+ export declare const createPatient: (overrides?: PartialDeep<AndesPatient>) => {
6
+ _id?: string | undefined;
7
+ id?: string | undefined;
8
+ documento?: string | undefined;
9
+ cuil?: string | undefined;
10
+ tipoIdentificacion?: string | null | undefined;
11
+ numeroIdentificacion?: string | null | undefined;
12
+ nombre: string;
13
+ apellido: string;
14
+ fechaNacimiento?: string | Date | undefined;
15
+ fechaFallecimiento?: string | Date | null | undefined;
16
+ genero?: string | undefined;
17
+ sexo?: string | undefined;
18
+ estado?: string | null | undefined;
19
+ activo?: boolean | undefined;
20
+ estadoCivil?: string | null | undefined;
21
+ contacto?: import("../types/andes/patient.types").AndesContacto[] | undefined;
22
+ direccion?: import("../types/andes/patient.types").AndesDireccion[] | undefined;
23
+ relaciones?: import("../types/andes/patient.types").AndesRelacion[] | undefined;
24
+ foto?: string | null | undefined;
25
+ createdBy?: import("../types/andes/patient.types").AndesCreatedBy | undefined;
26
+ };
@@ -1,31 +1,35 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.createPatient = void 0;
23
- const basePatient = __importStar(require("../data/patient.json"));
24
- exports.createPatient = (overrides = {}) => {
25
- const clone = JSON.parse(JSON.stringify(basePatient));
26
- return {
27
- ...clone,
28
- ...overrides,
29
- };
30
- };
31
- //# sourceMappingURL=patientFactory.js.map
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.createPatient = void 0;
27
+ const basePatient = __importStar(require("../data/patient.json"));
28
+ const createPatient = (overrides = {}) => {
29
+ const clone = JSON.parse(JSON.stringify(basePatient));
30
+ return {
31
+ ...clone,
32
+ ...overrides,
33
+ };
34
+ };
35
+ exports.createPatient = createPatient;
@@ -0,0 +1,15 @@
1
+ import * as AllergyIntolerance from './lib/allergyIntolerance';
2
+ import * as Bundle from './lib/bundle';
3
+ import * as Composition from './lib/composition';
4
+ import * as Condition from './lib/condition';
5
+ import * as Device from './lib/device';
6
+ import * as DocumentReference from './lib/document-reference';
7
+ import * as Immunization from './lib/immunization';
8
+ import * as Medication from './lib/medication';
9
+ import * as MedicationRequest from './lib/medicationRequest';
10
+ import * as MedicationStatement from './lib/medicationStatement';
11
+ import * as Organization from './lib/organization';
12
+ import * as Patient from './lib/patient';
13
+ import * as Practitioner from './lib/practitioner';
14
+ export { getDominio, initialize } from './lib/config';
15
+ export { Patient, Practitioner, Organization, Immunization, Condition, Composition, Bundle, DocumentReference, Device, Medication, MedicationStatement, MedicationRequest, AllergyIntolerance };
package/dist/index.js CHANGED
@@ -1,52 +1,55 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.AllergyIntolerance = exports.MedicationRequest = exports.MedicationStatement = exports.Medication = exports.Device = exports.DocumentReference = exports.Bundle = exports.Composition = exports.Condition = exports.Immunization = exports.Organization = exports.Practitioner = exports.Patient = void 0;
23
- const AllergyIntolerance = __importStar(require("./src/lib/allergyIntolerance"));
24
- exports.AllergyIntolerance = AllergyIntolerance;
25
- const Bundle = __importStar(require("./src/lib/bundle"));
26
- exports.Bundle = Bundle;
27
- const Composition = __importStar(require("./src/lib/composition"));
28
- exports.Composition = Composition;
29
- const Condition = __importStar(require("./src/lib/condition"));
30
- exports.Condition = Condition;
31
- const Device = __importStar(require("./src/lib/device"));
32
- exports.Device = Device;
33
- const DocumentReference = __importStar(require("./src/lib/document-reference"));
34
- exports.DocumentReference = DocumentReference;
35
- const Immunization = __importStar(require("./src/lib/immunization"));
36
- exports.Immunization = Immunization;
37
- const Medication = __importStar(require("./src/lib/medication"));
38
- exports.Medication = Medication;
39
- const MedicationRequest = __importStar(require("./src/lib/medicationRequest"));
40
- exports.MedicationRequest = MedicationRequest;
41
- const MedicationStatement = __importStar(require("./src/lib/medicationStatement"));
42
- exports.MedicationStatement = MedicationStatement;
43
- const Organization = __importStar(require("./src/lib/organization"));
44
- exports.Organization = Organization;
45
- const Patient = __importStar(require("./src/lib/patient"));
46
- exports.Patient = Patient;
47
- const Practitioner = __importStar(require("./src/lib/practitioner"));
48
- exports.Practitioner = Practitioner;
49
- var config_1 = require("./src/lib/config");
50
- Object.defineProperty(exports, "getDominio", { enumerable: true, get: function () { return config_1.getDominio; } });
51
- Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return config_1.initialize; } });
52
- //# sourceMappingURL=index.js.map
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.AllergyIntolerance = exports.MedicationRequest = exports.MedicationStatement = exports.Medication = exports.Device = exports.DocumentReference = exports.Bundle = exports.Composition = exports.Condition = exports.Immunization = exports.Organization = exports.Practitioner = exports.Patient = exports.initialize = exports.getDominio = void 0;
27
+ const AllergyIntolerance = __importStar(require("./lib/allergyIntolerance"));
28
+ exports.AllergyIntolerance = AllergyIntolerance;
29
+ const Bundle = __importStar(require("./lib/bundle"));
30
+ exports.Bundle = Bundle;
31
+ const Composition = __importStar(require("./lib/composition"));
32
+ exports.Composition = Composition;
33
+ const Condition = __importStar(require("./lib/condition"));
34
+ exports.Condition = Condition;
35
+ const Device = __importStar(require("./lib/device"));
36
+ exports.Device = Device;
37
+ const DocumentReference = __importStar(require("./lib/document-reference"));
38
+ exports.DocumentReference = DocumentReference;
39
+ const Immunization = __importStar(require("./lib/immunization"));
40
+ exports.Immunization = Immunization;
41
+ const Medication = __importStar(require("./lib/medication"));
42
+ exports.Medication = Medication;
43
+ const MedicationRequest = __importStar(require("./lib/medicationRequest"));
44
+ exports.MedicationRequest = MedicationRequest;
45
+ const MedicationStatement = __importStar(require("./lib/medicationStatement"));
46
+ exports.MedicationStatement = MedicationStatement;
47
+ const Organization = __importStar(require("./lib/organization"));
48
+ exports.Organization = Organization;
49
+ const Patient = __importStar(require("./lib/patient"));
50
+ exports.Patient = Patient;
51
+ const Practitioner = __importStar(require("./lib/practitioner"));
52
+ exports.Practitioner = Practitioner;
53
+ var config_1 = require("./lib/config");
54
+ Object.defineProperty(exports, "getDominio", { enumerable: true, get: function () { return config_1.getDominio; } });
55
+ Object.defineProperty(exports, "initialize", { enumerable: true, get: function () { return config_1.initialize; } });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Encode de Alergias e Intolerancias from ANDES to FHIR
3
+ * @param {} AllergyIntolerance
4
+ */
5
+ export declare function encode(patientReference: any, alergiaIntolerancia: any): {
6
+ category: string[];
7
+ criticality: string;
8
+ patient: {
9
+ reference: any;
10
+ };
11
+ id: any;
12
+ code: {
13
+ coding: {
14
+ system: string;
15
+ display: any;
16
+ code: any;
17
+ }[];
18
+ };
19
+ meta: {
20
+ profile: string[];
21
+ };
22
+ text: {
23
+ status: string;
24
+ div: string;
25
+ };
26
+ resourceType: string;
27
+ type: string;
28
+ onsetDateTime: any;
29
+ };