@andes/fhir 1.12.0 → 1.12.1-beta.1

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 (103) hide show
  1. package/{src → dist}/data/patient.json +192 -192
  2. package/dist/{src/helpers → helpers}/patientFactory.js +35 -31
  3. package/dist/{src/lib → lib}/allergyIntolerance.js +39 -40
  4. package/dist/{src/lib → lib}/bundle.js +25 -26
  5. package/dist/{src/lib → lib}/composition.js +152 -152
  6. package/dist/{src/lib → lib}/condition.js +79 -80
  7. package/dist/{src/lib → lib}/config.js +27 -21
  8. package/dist/lib/config.test.js +19 -0
  9. package/dist/{src/lib → lib}/device.js +38 -39
  10. package/dist/lib/device.test.js +9 -0
  11. package/dist/{src/lib → lib}/document-reference.js +106 -107
  12. package/dist/{src/lib → lib}/immunization.js +67 -68
  13. package/{src/lib/medication.ts → dist/lib/medication.js} +64 -61
  14. package/{src/lib/medicationRequest.ts → dist/lib/medicationRequest.js} +103 -100
  15. package/dist/{src/lib → lib}/medicationStatement.js +55 -56
  16. package/dist/lib/organization.js +93 -0
  17. package/dist/lib/patient.js +465 -0
  18. package/dist/{src/lib → lib}/patient.test.js +132 -113
  19. package/dist/lib/practitioner.js +186 -0
  20. package/dist/types/andes/organization.types.js +2 -0
  21. package/dist/types/andes/patient.types.js +2 -0
  22. package/dist/types/andes/practitioner.types.js +3 -0
  23. package/package.json +53 -44
  24. package/.circleci/config.yml +0 -72
  25. package/.editorconfig +0 -14
  26. package/.env.example +0 -2
  27. package/.gitattributes +0 -1
  28. package/.github/CODEOWNERS +0 -1
  29. package/.github/labeler.yml +0 -11
  30. package/.github/pull_request_template.md +0 -28
  31. package/.github/workflows/build_test.yml +0 -14
  32. package/.github/workflows/has_conflicts.yml +0 -13
  33. package/.vscode/settings.json +0 -2
  34. package/CHANGELOG.md +0 -351
  35. package/coverage/clover.xml +0 -209
  36. package/coverage/coverage-final.json +0 -5
  37. package/coverage/lcov-report/base.css +0 -224
  38. package/coverage/lcov-report/block-navigation.js +0 -87
  39. package/coverage/lcov-report/config.ts.html +0 -136
  40. package/coverage/lcov-report/device.ts.html +0 -193
  41. package/coverage/lcov-report/favicon.png +0 -0
  42. package/coverage/lcov-report/helpers/index.html +0 -116
  43. package/coverage/lcov-report/helpers/patientFactory.ts.html +0 -124
  44. package/coverage/lcov-report/index.html +0 -131
  45. package/coverage/lcov-report/lib/config.ts.html +0 -136
  46. package/coverage/lcov-report/lib/device.ts.html +0 -193
  47. package/coverage/lcov-report/lib/index.html +0 -146
  48. package/coverage/lcov-report/lib/patient.ts.html +0 -1318
  49. package/coverage/lcov-report/patient.ts.html +0 -1207
  50. package/coverage/lcov-report/prettify.css +0 -1
  51. package/coverage/lcov-report/prettify.js +0 -2
  52. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  53. package/coverage/lcov-report/sorter.js +0 -210
  54. package/coverage/lcov.info +0 -425
  55. package/dist/index.js +0 -52
  56. package/dist/index.js.map +0 -1
  57. package/dist/src/data/patient.json +0 -192
  58. package/dist/src/helpers/patientFactory.js.map +0 -1
  59. package/dist/src/lib/allergyIntolerance.js.map +0 -1
  60. package/dist/src/lib/bundle.js.map +0 -1
  61. package/dist/src/lib/composition.js.map +0 -1
  62. package/dist/src/lib/condition.js.map +0 -1
  63. package/dist/src/lib/config.js.map +0 -1
  64. package/dist/src/lib/config.test.js +0 -13
  65. package/dist/src/lib/config.test.js.map +0 -1
  66. package/dist/src/lib/device.js.map +0 -1
  67. package/dist/src/lib/device.test.js +0 -10
  68. package/dist/src/lib/device.test.js.map +0 -1
  69. package/dist/src/lib/document-reference.js.map +0 -1
  70. package/dist/src/lib/immunization.js.map +0 -1
  71. package/dist/src/lib/medication.js +0 -65
  72. package/dist/src/lib/medication.js.map +0 -1
  73. package/dist/src/lib/medicationRequest.js +0 -103
  74. package/dist/src/lib/medicationRequest.js.map +0 -1
  75. package/dist/src/lib/medicationStatement.js.map +0 -1
  76. package/dist/src/lib/organization.js +0 -91
  77. package/dist/src/lib/organization.js.map +0 -1
  78. package/dist/src/lib/patient.js +0 -397
  79. package/dist/src/lib/patient.js.map +0 -1
  80. package/dist/src/lib/patient.test.js.map +0 -1
  81. package/dist/src/lib/practitioner.js +0 -161
  82. package/dist/src/lib/practitioner.js.map +0 -1
  83. package/index.ts +0 -30
  84. package/jest.config.js +0 -12
  85. package/release.config.js +0 -74
  86. package/src/helpers/patientFactory.ts +0 -13
  87. package/src/lib/allergyIntolerance.ts +0 -36
  88. package/src/lib/bundle.ts +0 -19
  89. package/src/lib/composition.ts +0 -153
  90. package/src/lib/condition.ts +0 -80
  91. package/src/lib/config.test.ts +0 -13
  92. package/src/lib/config.ts +0 -17
  93. package/src/lib/device.test.ts +0 -9
  94. package/src/lib/device.ts +0 -36
  95. package/src/lib/document-reference.ts +0 -102
  96. package/src/lib/immunization.ts +0 -64
  97. package/src/lib/medicationStatement.ts +0 -52
  98. package/src/lib/organization.ts +0 -89
  99. package/src/lib/patient.test.ts +0 -101
  100. package/src/lib/patient.ts +0 -411
  101. package/src/lib/practitioner.ts +0 -157
  102. package/tsconfig.test.json +0 -18
  103. package/tslint.json +0 -139
@@ -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
+ }
@@ -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;
@@ -1,40 +1,39 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encode = void 0;
4
- /**
5
- * Encode de Alergias e Intolerancias from ANDES to FHIR
6
- * @param {} AllergyIntolerance
7
- */
8
- function encode(patientReference, alergiaIntolerancia) {
9
- return {
10
- category: [
11
- 'medication'
12
- ],
13
- criticality: 'high',
14
- patient: {
15
- reference: patientReference
16
- },
17
- id: alergiaIntolerancia._id,
18
- code: {
19
- coding: [
20
- {
21
- system: 'http://snomed.info/sct',
22
- display: alergiaIntolerancia.concepto.term,
23
- code: alergiaIntolerancia.concepto.conceptId,
24
- }
25
- ]
26
- },
27
- meta: {
28
- profile: ['http://hl7.org/fhir/uv/ips/StructureDefinition/allergyintolerance-uv-ips']
29
- },
30
- text: {
31
- status: 'generated',
32
- div: `<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: Alergia </p><p><b>meta</b>: </p><p><b>text</b>: ${alergiaIntolerancia.concepto.semanticTag}</p></div>`
33
- },
34
- resourceType: 'AllergyIntolerance',
35
- type: 'allergy',
36
- onsetDateTime: alergiaIntolerancia.valor.fechaInicio
37
- };
38
- }
39
- exports.encode = encode;
40
- //# sourceMappingURL=allergyIntolerance.js.map
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.encode = void 0;
4
+ /**
5
+ * Encode de Alergias e Intolerancias from ANDES to FHIR
6
+ * @param {} AllergyIntolerance
7
+ */
8
+ function encode(patientReference, alergiaIntolerancia) {
9
+ return {
10
+ category: [
11
+ 'medication'
12
+ ],
13
+ criticality: 'high',
14
+ patient: {
15
+ reference: patientReference
16
+ },
17
+ id: alergiaIntolerancia._id,
18
+ code: {
19
+ coding: [
20
+ {
21
+ system: 'http://snomed.info/sct',
22
+ display: alergiaIntolerancia.concepto.term,
23
+ code: alergiaIntolerancia.concepto.conceptId,
24
+ }
25
+ ]
26
+ },
27
+ meta: {
28
+ profile: ['http://hl7.org/fhir/uv/ips/StructureDefinition/allergyintolerance-uv-ips']
29
+ },
30
+ text: {
31
+ status: 'generated',
32
+ div: `<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: Alergia </p><p><b>meta</b>: </p><p><b>text</b>: ${alergiaIntolerancia.concepto.semanticTag}</p></div>`
33
+ },
34
+ resourceType: 'AllergyIntolerance',
35
+ type: 'allergy',
36
+ onsetDateTime: alergiaIntolerancia.valor.fechaInicio
37
+ };
38
+ }
39
+ exports.encode = encode;
@@ -1,26 +1,25 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.encode = void 0;
7
- const moment_1 = __importDefault(require("moment"));
8
- const config_1 = require("./config");
9
- function encode(ID, resources) {
10
- return {
11
- resourceType: 'Bundle',
12
- id: ID,
13
- meta: {
14
- lastUpdated: moment_1.default().format()
15
- },
16
- language: 'es-AR',
17
- entry: resources,
18
- type: 'document',
19
- identifier: {
20
- system: config_1.makeUrl('Bundle'),
21
- value: ID
22
- }
23
- };
24
- }
25
- exports.encode = encode;
26
- //# sourceMappingURL=bundle.js.map
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.encode = void 0;
7
+ const moment_1 = __importDefault(require("moment"));
8
+ const config_1 = require("./config");
9
+ function encode(ID, resources) {
10
+ return {
11
+ resourceType: 'Bundle',
12
+ id: ID,
13
+ meta: {
14
+ lastUpdated: (0, moment_1.default)().format()
15
+ },
16
+ language: 'es-AR',
17
+ entry: resources,
18
+ type: 'document',
19
+ identifier: {
20
+ system: (0, config_1.makeUrl)('Bundle'),
21
+ value: ID
22
+ }
23
+ };
24
+ }
25
+ exports.encode = encode;