{
  "info": {
    "_postman_id": "6dbf9f83-423a-5083-90a7-ad9b0de28c76",
    "name": "Aprende FHIR desde cero",
    "description": "Taller de HL7 FHIR R4 con un caso clínico ecuatoriano ficticio. Ejecuta las peticiones en orden: cada POST guarda el id creado en una variable de la colección (y del entorno, si elegiste uno) que usan las peticiones siguientes. Elige el entorno hapi-publico o hapi-local, o cambia la variable FHIRURL. Solo datos sintéticos.\n\nhttps://github.com/f-slg/aprende-fhir",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "01 · Fundamentos",
      "item": [
        {
          "name": "01a · Declaración de capacidades del servidor",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/metadata"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "01b · Buscar pacientes (primeros 5)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient?_count=5"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "01c · Error a propósito: tipo de recurso en español",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Paciente\",\n  \"gender\": \"male\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/01-fundamentos/errores/01e1_resourcetype_en_espanol.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        },
        {
          "name": "01d · Error a propósito: elemento en español (se pierde en silencio)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/ejercicio-01\",\n      \"value\": \"{{$guid}}\"\n    }\n  ],\n  \"nombre\": [\n    {\n      \"text\": \"Luis Alberto Paredes Cevallos\"\n    }\n  ],\n  \"gender\": \"male\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/01-fundamentos/errores/01e2_elemento_en_espanol.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorPatientId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorPatientId\", id);",
                  "console.log(\"errorPatientId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "01e · Leer lo que guardó el servidor",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{errorPatientId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "01f · Borrar el paciente de prueba",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{errorPatientId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "02 · Patient",
      "item": [
        {
          "name": "02a · Crear el paciente",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"NI\",\n            \"display\": \"National unique individual identifier\"\n          }\n        ],\n        \"text\": \"Cédula de identidad\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n      \"value\": \"9900000017\"\n    },\n    {\n      \"use\": \"usual\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"MR\",\n            \"display\": \"Medical record number\"\n          }\n        ],\n        \"text\": \"Historia clínica\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n      \"value\": \"HC-000123\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Luis Alberto Paredes Cevallos\",\n      \"family\": \"Paredes Cevallos\",\n      \"_family\": {\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n            \"valueString\": \"Paredes\"\n          },\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n            \"valueString\": \"Cevallos\"\n          }\n        ]\n      },\n      \"given\": [\n        \"Luis\",\n        \"Alberto\"\n      ]\n    },\n    {\n      \"use\": \"usual\",\n      \"text\": \"Luis Paredes\"\n    }\n  ],\n  \"gender\": \"male\",\n  \"birthDate\": \"1979-03-12\",\n  \"address\": [\n    {\n      \"use\": \"home\",\n      \"type\": \"physical\",\n      \"line\": [\n        \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n      ],\n      \"city\": \"Quito\",\n      \"district\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ],\n  \"communication\": [\n    {\n      \"language\": {\n        \"coding\": [\n          {\n            \"system\": \"urn:ietf:bcp:47\",\n            \"code\": \"es\",\n            \"display\": \"Spanish\"\n          }\n        ],\n        \"text\": \"Español\"\n      },\n      \"preferred\": true\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n      \"valueAddress\": {\n        \"city\": \"Riobamba\",\n        \"state\": \"Chimborazo\",\n        \"country\": \"EC\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/02-patient/soluciones/02a_patient_crear.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"patientId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"patientId\", id);",
                  "console.log(\"patientId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "02b · Leer el paciente por id",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "02c · Buscar el paciente por cédula",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient?identifier=https://f-slg.github.io/aprende-fhir/sid/cedula|9900000017"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "02d · Buscar el paciente por nombre",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient?family=Paredes&given=Luis"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "02e · Actualizar el paciente (teléfono y estado civil)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"id\": \"{{patientId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p><p>Teléfono +593 99 000 0000 · Casado.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"NI\",\n            \"display\": \"National unique individual identifier\"\n          }\n        ],\n        \"text\": \"Cédula de identidad\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n      \"value\": \"9900000017\"\n    },\n    {\n      \"use\": \"usual\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"MR\",\n            \"display\": \"Medical record number\"\n          }\n        ],\n        \"text\": \"Historia clínica\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n      \"value\": \"HC-000123\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Luis Alberto Paredes Cevallos\",\n      \"family\": \"Paredes Cevallos\",\n      \"_family\": {\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n            \"valueString\": \"Paredes\"\n          },\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n            \"valueString\": \"Cevallos\"\n          }\n        ]\n      },\n      \"given\": [\n        \"Luis\",\n        \"Alberto\"\n      ]\n    },\n    {\n      \"use\": \"usual\",\n      \"text\": \"Luis Paredes\"\n    }\n  ],\n  \"gender\": \"male\",\n  \"birthDate\": \"1979-03-12\",\n  \"address\": [\n    {\n      \"use\": \"home\",\n      \"type\": \"physical\",\n      \"line\": [\n        \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n      ],\n      \"city\": \"Quito\",\n      \"district\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ],\n  \"communication\": [\n    {\n      \"language\": {\n        \"coding\": [\n          {\n            \"system\": \"urn:ietf:bcp:47\",\n            \"code\": \"es\",\n            \"display\": \"Spanish\"\n          }\n        ],\n        \"text\": \"Español\"\n      },\n      \"preferred\": true\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n      \"valueAddress\": {\n        \"city\": \"Riobamba\",\n        \"state\": \"Chimborazo\",\n        \"country\": \"EC\"\n      }\n    }\n  ],\n  \"telecom\": [\n    {\n      \"system\": \"phone\",\n      \"value\": \"+593 99 000 0000\",\n      \"use\": \"mobile\"\n    }\n  ],\n  \"maritalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\",\n        \"code\": \"M\",\n        \"display\": \"Married\"\n      }\n    ],\n    \"text\": \"Casado\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/02-patient/soluciones/02e_patient_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "02f · Historial de versiones del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}/_history"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "02g · Error a propósito: fecha con formato local",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"name\": [\n    {\n      \"text\": \"Luis Alberto Paredes Cevallos\"\n    }\n  ],\n  \"birthDate\": \"12/03/1979\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/02-patient/errores/02e1_fecha_formato_local.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "03 · Transacciones",
      "item": [
        {
          "name": "03a · Crear a la familia en una transacción",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Bundle\",\n  \"type\": \"transaction\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:f7c61a9c-0abc-5d6f-8814-2b25090472ff\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>María José Paredes Andrade, cédula ficticia 9900000025.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"NI\",\n                  \"display\": \"National unique individual identifier\"\n                }\n              ],\n              \"text\": \"Cédula de identidad\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n            \"value\": \"9900000025\"\n          }\n        ],\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"María José Paredes Andrade\",\n            \"family\": \"Paredes Andrade\",\n            \"given\": [\n              \"María\",\n              \"José\"\n            ]\n          }\n        ],\n        \"gender\": \"female\",\n        \"birthDate\": \"2006-07-21\"\n      },\n      \"request\": {\n        \"method\": \"POST\",\n        \"url\": \"Patient\",\n        \"ifNoneExist\": \"identifier=https://f-slg.github.io/aprende-fhir/sid/cedula|9900000025\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:7e8908cb-6dc5-5d36-8da3-569708c9956d\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carmen Elena Andrade Vega, cédula ficticia 9900000033.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"NI\",\n                  \"display\": \"National unique individual identifier\"\n                }\n              ],\n              \"text\": \"Cédula de identidad\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n            \"value\": \"9900000033\"\n          }\n        ],\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Carmen Elena Andrade Vega\",\n            \"family\": \"Andrade Vega\",\n            \"given\": [\n              \"Carmen\",\n              \"Elena\"\n            ]\n          }\n        ],\n        \"gender\": \"female\",\n        \"birthDate\": \"1981-11-02\"\n      },\n      \"request\": {\n        \"method\": \"POST\",\n        \"url\": \"Patient\",\n        \"ifNoneExist\": \"identifier=https://f-slg.github.io/aprende-fhir/sid/cedula|9900000033\"\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:9e683edb-5c5b-5a1e-87a1-fe0923235ea0\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Daniel Esteban Paredes Andrade, cédula ficticia 9900000041.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"NI\",\n                  \"display\": \"National unique individual identifier\"\n                }\n              ],\n              \"text\": \"Cédula de identidad\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n            \"value\": \"9900000041\"\n          }\n        ],\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Daniel Esteban Paredes Andrade\",\n            \"family\": \"Paredes Andrade\",\n            \"given\": [\n              \"Daniel\",\n              \"Esteban\"\n            ]\n          }\n        ],\n        \"gender\": \"male\",\n        \"birthDate\": \"2010-01-15\"\n      },\n      \"request\": {\n        \"method\": \"POST\",\n        \"url\": \"Patient\",\n        \"ifNoneExist\": \"identifier=https://f-slg.github.io/aprende-fhir/sid/cedula|9900000041\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/03-transacciones/soluciones/03a_bundle_transaction_familia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "03b · Buscar a los Paredes",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient?family=Paredes"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "04 · Profesionales y organizaciones",
      "item": [
        {
          "name": "04a · Crear a la médica",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Practitioner",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Practitioner\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dra. Andrea Lucía Salazar Moreno, médica general. Registro profesional ficticio RP-000457.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/registro-profesional\",\n      \"value\": \"RP-000457\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Dra. Andrea Lucía Salazar Moreno\",\n      \"prefix\": [\n        \"Dra.\"\n      ],\n      \"family\": \"Salazar Moreno\",\n      \"given\": [\n        \"Andrea\",\n        \"Lucía\"\n      ]\n    }\n  ],\n  \"telecom\": [\n    {\n      \"system\": \"email\",\n      \"value\": \"andrea.salazar@hospital-ejemplo.invalid\",\n      \"use\": \"work\"\n    }\n  ],\n  \"gender\": \"female\",\n  \"qualification\": [\n    {\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0360\",\n            \"code\": \"MD\",\n            \"display\": \"Doctor of Medicine\"\n          }\n        ],\n        \"text\": \"Médica\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/04-profesionales-y-organizaciones/soluciones/04a_practitioner_crear.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"practitionerId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"practitionerId\", id);",
                  "console.log(\"practitionerId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "04b · Crear la red de servicios",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Organization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Organization\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Red de Servicios de Salud Ejemplo (organización ficticia).</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/establecimiento\",\n      \"value\": \"RED-0001\"\n    }\n  ],\n  \"active\": true,\n  \"type\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/organization-type\",\n          \"code\": \"prov\",\n          \"display\": \"Healthcare Provider\"\n        }\n      ]\n    }\n  ],\n  \"name\": \"Red de Servicios de Salud Ejemplo\",\n  \"address\": [\n    {\n      \"city\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/04-profesionales-y-organizaciones/soluciones/04b_organization_red.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"organizationId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"organizationId\", id);",
                  "console.log(\"organizationId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "04c · Crear el hospital (parte de la red)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Organization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Organization\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Hospital General Docente Ejemplo, parte de la Red de Servicios de Salud Ejemplo (ficticia).</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/establecimiento\",\n      \"value\": \"HGDE-0001\"\n    }\n  ],\n  \"active\": true,\n  \"type\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/organization-type\",\n          \"code\": \"prov\",\n          \"display\": \"Healthcare Provider\"\n        }\n      ]\n    }\n  ],\n  \"name\": \"Hospital General Docente Ejemplo\",\n  \"telecom\": [\n    {\n      \"system\": \"phone\",\n      \"value\": \"+593 2 000 0000\",\n      \"use\": \"work\"\n    }\n  ],\n  \"address\": [\n    {\n      \"line\": [\n        \"Av. Principal Ejemplo S00-00\"\n      ],\n      \"city\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ],\n  \"partOf\": {\n    \"reference\": \"Organization/{{organizationId}}\",\n    \"display\": \"Red de Servicios de Salud Ejemplo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/04-profesionales-y-organizaciones/soluciones/04c_organization_hospital.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"hospitalId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"hospitalId\", id);",
                  "console.log(\"hospitalId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "04d · Buscar los establecimientos de la red",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Organization?partof={{organizationId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "04e · Error a propósito: referencia a una organización que no existe",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Organization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Organization\",\n  \"name\": \"Centro de Salud Ejemplo\",\n  \"partOf\": {\n    \"reference\": \"Organization/no-existe-123\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/04-profesionales-y-organizaciones/errores/04e1_referencia_inexistente.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "05 · Diagnóstico y encuentro",
      "item": [
        {
          "name": "05a · Registrar el diagnóstico de intoxicación",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Condition",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Condition\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Intoxicación alimentaria bacteriana, no especificada (moderada).</p><p>Inicio: 17 de marzo de 2025. Resuelta.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/condicion\",\n      \"value\": \"COND-2025-0001\"\n    }\n  ],\n  \"clinicalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n        \"code\": \"resolved\",\n        \"display\": \"Resolved\"\n      }\n    ]\n  },\n  \"verificationStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\n        \"code\": \"confirmed\",\n        \"display\": \"Confirmed\"\n      }\n    ]\n  },\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n          \"code\": \"encounter-diagnosis\",\n          \"display\": \"Encounter Diagnosis\"\n        }\n      ]\n    }\n  ],\n  \"severity\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"6736007\",\n        \"display\": \"Moderate (severity modifier)\"\n      }\n    ],\n    \"text\": \"Moderada\"\n  },\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/sid/icd-10\",\n        \"code\": \"A05.9\",\n        \"display\": \"Bacterial foodborne intoxication, unspecified\"\n      }\n    ],\n    \"text\": \"Intoxicación alimentaria bacteriana, no especificada\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"onsetDateTime\": \"2025-03-17\",\n  \"abatementDateTime\": \"2025-03-24\",\n  \"recordedDate\": \"2025-03-20\",\n  \"recorder\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"asserter\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"evidence\": [\n    {\n      \"code\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"422587007\",\n              \"display\": \"Nausea\"\n            }\n          ],\n          \"text\": \"Náuseas\"\n        },\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"422400008\",\n              \"display\": \"Vomiting\"\n            }\n          ],\n          \"text\": \"Vómito\"\n        },\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"21522001\",\n              \"display\": \"Abdominal pain\"\n            }\n          ],\n          \"text\": \"Dolor abdominal\"\n        },\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"62315008\",\n              \"display\": \"Diarrhea\"\n            }\n          ],\n          \"text\": \"Diarrea\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/05-diagnostico-y-encuentro/soluciones/05a_condition_intoxicacion.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"conditionIntoxId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"conditionIntoxId\", id);",
                  "console.log(\"conditionIntoxId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "05b · Registrar el encuentro",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Encounter",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Encounter\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Consulta ambulatoria por dolor abdominal, náuseas y diarrea.</p><p>20 de marzo de 2025, 07:15 a 08:15 · Hospital General Docente Ejemplo · Dra. Andrea Lucía Salazar Moreno.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/encuentro\",\n      \"value\": \"ENC-2025-0001\"\n    }\n  ],\n  \"status\": \"finished\",\n  \"class\": {\n    \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n    \"code\": \"AMB\",\n    \"display\": \"ambulatory\"\n  },\n  \"serviceType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/service-type\",\n        \"code\": \"124\",\n        \"display\": \"General Practice\"\n      }\n    ],\n    \"text\": \"Medicina general\"\n  },\n  \"priority\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActPriority\",\n        \"code\": \"R\",\n        \"display\": \"routine\"\n      }\n    ],\n    \"text\": \"Rutina\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"participant\": [\n    {\n      \"type\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ParticipationType\",\n              \"code\": \"ATND\",\n              \"display\": \"attender\"\n            }\n          ]\n        }\n      ],\n      \"individual\": {\n        \"reference\": \"Practitioner/{{practitionerId}}\",\n        \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n      }\n    }\n  ],\n  \"period\": {\n    \"start\": \"2025-03-20T07:15:00-05:00\",\n    \"end\": \"2025-03-20T08:15:00-05:00\"\n  },\n  \"reasonCode\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"21522001\",\n          \"display\": \"Abdominal pain\"\n        }\n      ],\n      \"text\": \"Dolor abdominal, náuseas y diarrea\"\n    }\n  ],\n  \"diagnosis\": [\n    {\n      \"condition\": {\n        \"reference\": \"Condition/{{conditionIntoxId}}\",\n        \"display\": \"Intoxicación alimentaria bacteriana\"\n      },\n      \"use\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/diagnosis-role\",\n            \"code\": \"DD\",\n            \"display\": \"Discharge diagnosis\"\n          }\n        ]\n      },\n      \"rank\": 1\n    }\n  ],\n  \"serviceProvider\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/05-diagnostico-y-encuentro/soluciones/05b_encounter_crear.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"encounterId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"encounterId\", id);",
                  "console.log(\"encounterId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "05c · Encuentros del paciente con su diagnóstico",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Encounter?subject=Patient/{{patientId}}&_include=Encounter:diagnosis"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "05d · Error a propósito: estado en español",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Encounter",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Encounter\",\n  \"status\": \"terminado\",\n  \"class\": {\n    \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n    \"code\": \"AMB\",\n    \"display\": \"ambulatory\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/05-diagnostico-y-encuentro/errores/05e1_estado_en_espanol.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "06 · Observaciones",
      "item": [
        {
          "name": "06a · Presión arterial (componentes)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Presión arterial: 128/84 mmHg.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"vital-signs\",\n          \"display\": \"Vital Signs\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"85354-9\",\n        \"display\": \"Blood pressure panel with all children optional\"\n      }\n    ],\n    \"text\": \"Presión arterial\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"component\": [\n    {\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"8480-6\",\n            \"display\": \"Systolic blood pressure\"\n          }\n        ],\n        \"text\": \"Presión sistólica\"\n      },\n      \"valueQuantity\": {\n        \"value\": 128,\n        \"unit\": \"mmHg\",\n        \"system\": \"http://unitsofmeasure.org\",\n        \"code\": \"mm[Hg]\"\n      }\n    },\n    {\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"8462-4\",\n            \"display\": \"Diastolic blood pressure\"\n          }\n        ],\n        \"text\": \"Presión diastólica\"\n      },\n      \"valueQuantity\": {\n        \"value\": 84,\n        \"unit\": \"mmHg\",\n        \"system\": \"http://unitsofmeasure.org\",\n        \"code\": \"mm[Hg]\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06a_observation_presion_arterial.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsPAId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsPAId\", id);",
                  "console.log(\"obsPAId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "06b · Temperatura (valueQuantity)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Temperatura corporal: 38,4 °C.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"vital-signs\",\n          \"display\": \"Vital Signs\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"8310-5\",\n        \"display\": \"Body temperature\"\n      }\n    ],\n    \"text\": \"Temperatura corporal\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueQuantity\": {\n    \"value\": 38.4,\n    \"unit\": \"°C\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"Cel\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06b_observation_temperatura.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsTempId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsTempId\", id);",
                  "console.log(\"obsTempId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "06c · Frecuencia respiratoria",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Frecuencia respiratoria: 20 respiraciones por minuto.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"vital-signs\",\n          \"display\": \"Vital Signs\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"9279-1\",\n        \"display\": \"Respiratory rate\"\n      }\n    ],\n    \"text\": \"Frecuencia respiratoria\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueQuantity\": {\n    \"value\": 20,\n    \"unit\": \"respiraciones/min\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"/min\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06c_observation_frecuencia_respiratoria.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsFRId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsFRId\", id);",
                  "console.log(\"obsFRId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "06d · Frecuencia cardíaca",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Frecuencia cardíaca: 102 latidos por minuto.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"vital-signs\",\n          \"display\": \"Vital Signs\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"8867-4\",\n        \"display\": \"Heart rate\"\n      }\n    ],\n    \"text\": \"Frecuencia cardíaca\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueQuantity\": {\n    \"value\": 102,\n    \"unit\": \"latidos/min\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"/min\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06d_observation_frecuencia_cardiaca.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsFCId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsFCId\", id);",
                  "console.log(\"obsFCId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "06e · Fiebre (valueBoolean)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Fiebre: presente.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"exam\",\n          \"display\": \"Exam\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"386661006\",\n        \"display\": \"Fever\"\n      }\n    ],\n    \"text\": \"Fiebre\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueBoolean\": true\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06e_observation_fiebre_boolean.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "06f · Motivo de consulta (valueString)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Motivo de consulta: dolor abdominal tipo cólico desde hace 3 días, con náuseas y diarrea.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"survey\",\n          \"display\": \"Survey\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"10154-3\",\n        \"display\": \"Chief complaint Narrative - Reported\"\n      }\n    ],\n    \"text\": \"Motivo de consulta\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueString\": \"Dolor abdominal tipo cólico desde hace 3 días, con náuseas y diarrea.\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06f_observation_motivo_string.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "06g · Sangre oculta en heces (valueCodeableConcept)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Sangre oculta en heces: positivo.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"2335-8\",\n        \"display\": \"Hemoglobin [Presence] in Stool from gastrointestinal\"\n      }\n    ],\n    \"text\": \"Sangre oculta en heces\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"10828004\",\n        \"display\": \"Positive\"\n      }\n    ],\n    \"text\": \"Positivo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06g_observation_sangre_oculta_codeable.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "06h · Título serológico (valueRatio)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Título de anticuerpos contra Salmonella (reacción de Widal, antígeno O): 1:160.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"text\": \"Salmonella typhi O, anticuerpos (título) en suero\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueRatio\": {\n    \"numerator\": {\n      \"value\": 1\n    },\n    \"denominator\": {\n      \"value\": 160\n    }\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/soluciones/06h_observation_titulo_ratio.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "06i · Signos vitales del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&category=vital-signs"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "06j · Error a propósito: decimal con coma",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"status\": \"final\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"8310-5\",\n        \"display\": \"Body temperature\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"valueQuantity\": {\n    \"value\": \"38,4\",\n    \"unit\": \"°C\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"Cel\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/errores/06e1_decimal_con_coma.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        },
        {
          "name": "06k · Error a propósito: observación sin código (el servidor la acepta)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"status\": \"final\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"valueQuantity\": {\n    \"value\": 38.4,\n    \"unit\": \"°C\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"Cel\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/errores/06e2_observacion_sin_codigo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorObsId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorObsId\", id);",
                  "console.log(\"errorObsId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "06l · Borrar la observación inválida",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation/{{errorObsId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "07 · Antecedentes",
      "item": [
        {
          "name": "07a · Alergia a la penicilina",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/AllergyIntolerance",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"AllergyIntolerance\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Alergia a la penicilina (criticidad alta): urticaria generalizada en la adolescencia.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/alergia\",\n      \"value\": \"AL-2025-0001\"\n    }\n  ],\n  \"clinicalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical\",\n        \"code\": \"active\",\n        \"display\": \"Active\"\n      }\n    ]\n  },\n  \"verificationStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification\",\n        \"code\": \"confirmed\",\n        \"display\": \"Confirmed\"\n      }\n    ]\n  },\n  \"type\": \"allergy\",\n  \"category\": [\n    \"medication\"\n  ],\n  \"criticality\": \"high\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"764146007\",\n        \"display\": \"Penicillin\"\n      }\n    ],\n    \"text\": \"Penicilina\"\n  },\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"onsetString\": \"En la adolescencia\",\n  \"recordedDate\": \"2025-03-20\",\n  \"recorder\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"asserter\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"reaction\": [\n    {\n      \"substance\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"764146007\",\n            \"display\": \"Penicillin\"\n          }\n        ],\n        \"text\": \"Penicilina\"\n      },\n      \"manifestation\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"126485001\",\n              \"display\": \"Urticaria\"\n            }\n          ],\n          \"text\": \"Urticaria generalizada\"\n        }\n      ],\n      \"severity\": \"moderate\",\n      \"description\": \"Ronchas en todo el cuerpo a las pocas horas de una inyección de penicilina.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/07-antecedentes/soluciones/07a_allergyintolerance_penicilina.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"allergyId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"allergyId\", id);",
                  "console.log(\"allergyId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "07b · Medicación habitual: losartán",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationStatement",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationStatement\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Toma losartán 50 mg por vía oral una vez al día para la hipertensión, desde 2021.</p></div>\"\n  },\n  \"status\": \"active\",\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"373567002\",\n        \"display\": \"Losartan\"\n      }\n    ],\n    \"text\": \"Losartán\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"context\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"effectivePeriod\": {\n    \"start\": \"2021-06\"\n  },\n  \"dateAsserted\": \"2025-03-20\",\n  \"informationSource\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"reasonCode\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"38341003\",\n          \"display\": \"Hypertensive disorder, systemic arterial\"\n        }\n      ],\n      \"text\": \"Hipertensión arterial\"\n    }\n  ],\n  \"dosage\": [\n    {\n      \"text\": \"50 mg por vía oral una vez al día\",\n      \"timing\": {\n        \"repeat\": {\n          \"frequency\": 1,\n          \"period\": 1,\n          \"periodUnit\": \"d\"\n        }\n      },\n      \"route\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"26643006\",\n            \"display\": \"Oral route\"\n          }\n        ],\n        \"text\": \"Vía oral\"\n      },\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": 50,\n            \"unit\": \"mg\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"mg\"\n          }\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/07-antecedentes/soluciones/07b_medicationstatement_losartan.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"medStatementId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"medStatementId\", id);",
                  "console.log(\"medStatementId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "07c · Antecedente familiar: madre",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/FamilyMemberHistory",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"FamilyMemberHistory\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Madre: cáncer de mama diagnosticado a los 52 años; falleció a los 60.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"date\": \"2025-03-20\",\n  \"name\": \"Rosa Cevallos (madre)\",\n  \"relationship\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n        \"code\": \"MTH\",\n        \"display\": \"mother\"\n      }\n    ],\n    \"text\": \"Madre\"\n  },\n  \"sex\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/administrative-gender\",\n        \"code\": \"female\",\n        \"display\": \"Female\"\n      }\n    ],\n    \"text\": \"Femenino\"\n  },\n  \"deceasedAge\": {\n    \"value\": 60,\n    \"unit\": \"años\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"a\"\n  },\n  \"condition\": [\n    {\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"254837009\",\n            \"display\": \"Malignant neoplasm of breast\"\n          }\n        ],\n        \"text\": \"Cáncer de mama\"\n      },\n      \"contributedToDeath\": true,\n      \"onsetAge\": {\n        \"value\": 52,\n        \"unit\": \"años\",\n        \"system\": \"http://unitsofmeasure.org\",\n        \"code\": \"a\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/07-antecedentes/soluciones/07c_familymemberhistory_madre.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"motherHistoryId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"motherHistoryId\", id);",
                  "console.log(\"motherHistoryId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "07d · Antecedente familiar: padre",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/FamilyMemberHistory",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"FamilyMemberHistory\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Padre: diabetes mellitus tipo 2 desde los 55 años; vivo.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"date\": \"2025-03-20\",\n  \"relationship\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n        \"code\": \"FTH\",\n        \"display\": \"father\"\n      }\n    ],\n    \"text\": \"Padre\"\n  },\n  \"sex\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/administrative-gender\",\n        \"code\": \"male\",\n        \"display\": \"Male\"\n      }\n    ],\n    \"text\": \"Masculino\"\n  },\n  \"deceasedBoolean\": false,\n  \"condition\": [\n    {\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"44054006\",\n            \"display\": \"Diabetes mellitus type 2\"\n          }\n        ],\n        \"text\": \"Diabetes mellitus tipo 2\"\n      },\n      \"onsetAge\": {\n        \"value\": 55,\n        \"unit\": \"años\",\n        \"system\": \"http://unitsofmeasure.org\",\n        \"code\": \"a\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/07-antecedentes/soluciones/07d_familymemberhistory_padre.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "07e · Alergias activas del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/AllergyIntolerance?patient=Patient/{{patientId}}&clinical-status=active"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "07f · Antecedentes familiares del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/FamilyMemberHistory?patient=Patient/{{patientId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "07g · Error a propósito: criticidad en español",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/AllergyIntolerance",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"AllergyIntolerance\",\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"764146007\",\n        \"display\": \"Penicillin\"\n      }\n    ]\n  },\n  \"criticality\": \"alta\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/07-antecedentes/errores/07e1_criticidad_en_espanol.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "08 · Vacunación",
      "item": [
        {
          "name": "08a · Vacuna diferida por fiebre (not-done)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Immunization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Immunization\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Vacuna contra la influenza NO aplicada el 20 de marzo de 2025: se difiere por fiebre (38,4 °C).</p></div>\"\n  },\n  \"status\": \"not-done\",\n  \"statusReason\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActReason\",\n        \"code\": \"MEDPREC\",\n        \"display\": \"medical precaution\"\n      }\n    ],\n    \"text\": \"Precaución médica: enfermedad aguda con fiebre\"\n  },\n  \"vaccineCode\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/sid/cvx\",\n        \"code\": \"141\",\n        \"display\": \"Influenza, split virus, trivalent, preservative\"\n      }\n    ],\n    \"text\": \"Influenza estacional\"\n  },\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"occurrenceDateTime\": \"2025-03-20T08:00:00-05:00\",\n  \"recorded\": \"2025-03-20\",\n  \"primarySource\": true,\n  \"note\": [\n    {\n      \"text\": \"Se indica volver al vacunatorio cuando esté sin fiebre.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/08-vacunacion/soluciones/08a_immunization_diferida.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "08b · Crear a la enfermera",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Practitioner",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Practitioner\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Lcda. Rosa Elena Quishpe Tenesaca, licenciada en enfermería. Registro profesional ficticio RP-000892.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/registro-profesional\",\n      \"value\": \"RP-000892\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Lcda. Rosa Elena Quishpe Tenesaca\",\n      \"prefix\": [\n        \"Lcda.\"\n      ],\n      \"family\": \"Quishpe Tenesaca\",\n      \"given\": [\n        \"Rosa\",\n        \"Elena\"\n      ]\n    }\n  ],\n  \"gender\": \"female\",\n  \"qualification\": [\n    {\n      \"code\": {\n        \"text\": \"Licenciatura en Enfermería\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/08-vacunacion/soluciones/08b_practitioner_enfermera.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"nursePractitionerId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"nursePractitionerId\", id);",
                  "console.log(\"nursePractitionerId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "08c · Atención en el vacunatorio",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Encounter",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Encounter\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Atención en el vacunatorio, 3 de abril de 2025, 10:00 a 10:20.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/encuentro\",\n      \"value\": \"ENC-2025-0002\"\n    }\n  ],\n  \"status\": \"finished\",\n  \"class\": {\n    \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n    \"code\": \"AMB\",\n    \"display\": \"ambulatory\"\n  },\n  \"type\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"33879002\",\n          \"display\": \"Administration of vaccine to produce active immunity\"\n        }\n      ],\n      \"text\": \"Vacunación\"\n    }\n  ],\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"participant\": [\n    {\n      \"type\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ParticipationType\",\n              \"code\": \"PPRF\",\n              \"display\": \"primary performer\"\n            }\n          ]\n        }\n      ],\n      \"individual\": {\n        \"reference\": \"Practitioner/{{nursePractitionerId}}\",\n        \"display\": \"Lcda. Rosa Elena Quishpe Tenesaca\"\n      }\n    }\n  ],\n  \"period\": {\n    \"start\": \"2025-04-03T10:00:00-05:00\",\n    \"end\": \"2025-04-03T10:20:00-05:00\"\n  },\n  \"serviceProvider\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/08-vacunacion/soluciones/08c_encounter_vacunacion.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"vaccinationEncounterId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"vaccinationEncounterId\", id);",
                  "console.log(\"vaccinationEncounterId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "08d · Vacuna contra la influenza",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Immunization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Immunization\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Vacuna contra la influenza estacional, 0,5 mL IM en el brazo izquierdo, lote FLU-25-0417.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"vaccineCode\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/sid/cvx\",\n        \"code\": \"141\",\n        \"display\": \"Influenza, split virus, trivalent, preservative\"\n      }\n    ],\n    \"text\": \"Influenza estacional\"\n  },\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{vaccinationEncounterId}}\",\n    \"display\": \"Vacunatorio, 3 de abril de 2025\"\n  },\n  \"occurrenceDateTime\": \"2025-04-03T10:10:00-05:00\",\n  \"recorded\": \"2025-04-03\",\n  \"primarySource\": true,\n  \"lotNumber\": \"FLU-25-0417\",\n  \"expirationDate\": \"2025-12-31\",\n  \"site\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"368208006\",\n        \"display\": \"Left upper arm structure\"\n      }\n    ],\n    \"text\": \"Brazo izquierdo\"\n  },\n  \"route\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration\",\n        \"code\": \"IM\",\n        \"display\": \"Injection, intramuscular\"\n      }\n    ],\n    \"text\": \"Intramuscular\"\n  },\n  \"doseQuantity\": {\n    \"value\": 0.5,\n    \"unit\": \"mL\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"mL\"\n  },\n  \"performer\": [\n    {\n      \"function\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0443\",\n            \"code\": \"AP\",\n            \"display\": \"Administering Provider\"\n          }\n        ],\n        \"text\": \"Vacunadora\"\n      },\n      \"actor\": {\n        \"reference\": \"Practitioner/{{nursePractitionerId}}\",\n        \"display\": \"Lcda. Rosa Elena Quishpe Tenesaca\"\n      }\n    }\n  ],\n  \"protocolApplied\": [\n    {\n      \"series\": \"Campaña de influenza 2025\",\n      \"targetDisease\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"6142004\",\n              \"display\": \"Influenza\"\n            }\n          ],\n          \"text\": \"Influenza\"\n        }\n      ],\n      \"doseNumberPositiveInt\": 1\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/08-vacunacion/soluciones/08d_immunization_influenza.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"fluImmunizationId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"fluImmunizationId\", id);",
                  "console.log(\"fluImmunizationId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "08e · Refuerzo de Td",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Immunization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Immunization\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Refuerzo de Td (tétanos y difteria), 0,5 mL IM en el brazo derecho, lote TD-24-1180.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"vaccineCode\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/sid/cvx\",\n        \"code\": \"09\",\n        \"display\": \"Td (adult), 2 Lf tetanus toxoid, preservative free, adsorbed\"\n      }\n    ],\n    \"text\": \"Td (tétanos y difteria, adultos)\"\n  },\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{vaccinationEncounterId}}\",\n    \"display\": \"Vacunatorio, 3 de abril de 2025\"\n  },\n  \"occurrenceDateTime\": \"2025-04-03T10:10:00-05:00\",\n  \"recorded\": \"2025-04-03\",\n  \"primarySource\": true,\n  \"lotNumber\": \"TD-24-1180\",\n  \"expirationDate\": \"2026-06-30\",\n  \"site\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"368209003\",\n        \"display\": \"Right upper arm structure\"\n      }\n    ],\n    \"text\": \"Brazo derecho\"\n  },\n  \"route\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration\",\n        \"code\": \"IM\",\n        \"display\": \"Injection, intramuscular\"\n      }\n    ],\n    \"text\": \"Intramuscular\"\n  },\n  \"doseQuantity\": {\n    \"value\": 0.5,\n    \"unit\": \"mL\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"mL\"\n  },\n  \"performer\": [\n    {\n      \"function\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0443\",\n            \"code\": \"AP\",\n            \"display\": \"Administering Provider\"\n          }\n        ],\n        \"text\": \"Vacunadora\"\n      },\n      \"actor\": {\n        \"reference\": \"Practitioner/{{nursePractitionerId}}\",\n        \"display\": \"Lcda. Rosa Elena Quishpe Tenesaca\"\n      }\n    }\n  ],\n  \"protocolApplied\": [\n    {\n      \"series\": \"Esquema de adultos (refuerzo cada 10 años)\",\n      \"targetDisease\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"76902006\",\n              \"display\": \"Tetanus\"\n            }\n          ],\n          \"text\": \"Tétanos\"\n        }\n      ],\n      \"doseNumberPositiveInt\": 4,\n      \"seriesDosesPositiveInt\": 4\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/08-vacunacion/soluciones/08e_immunization_td.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"tdImmunizationId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"tdImmunizationId\", id);",
                  "console.log(\"tdImmunizationId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "08f · Carné de vacunación del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Immunization?patient=Patient/{{patientId}}&_sort=date"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "08g · Error a propósito: vacuna sin fecha (el servidor la acepta)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Immunization",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Immunization\",\n  \"status\": \"completed\",\n  \"vaccineCode\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/sid/cvx\",\n        \"code\": \"141\",\n        \"display\": \"Influenza, split virus, trivalent, preservative\"\n      }\n    ]\n  },\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/08-vacunacion/errores/08e1_vacuna_sin_fecha.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorImmId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorImmId\", id);",
                  "console.log(\"errorImmId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "08h · Borrar la vacuna inválida",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Immunization/{{errorImmId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "09 · Documentos clínicos",
      "item": [
        {
          "name": "09a · Composition de signos vitales",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Composition",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Composition\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Nota de signos vitales del 20 de marzo de 2025.</p><p>Presión arterial 128/84 mmHg; Temperatura 38,4 °C; Frecuencia respiratoria 20/min; Frecuencia cardíaca 102/min.</p></div>\"\n  },\n  \"identifier\": {\n    \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n    \"value\": \"DOC-2025-0001\"\n  },\n  \"status\": \"final\",\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"8716-3\",\n        \"display\": \"Vital signs note\"\n      }\n    ],\n    \"text\": \"Nota de signos vitales\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{encounterId}}\",\n    \"display\": \"Consulta por dolor abdominal\"\n  },\n  \"date\": \"2025-03-20T08:00:00-05:00\",\n  \"author\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"title\": \"Signos vitales - consulta del 20 de marzo de 2025\",\n  \"custodian\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  },\n  \"section\": [\n    {\n      \"title\": \"Signos vitales\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"8716-3\",\n            \"display\": \"Vital signs note\"\n          }\n        ],\n        \"text\": \"Nota de signos vitales\"\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Presión arterial 128/84 mmHg; Temperatura 38,4 °C; Frecuencia respiratoria 20/min; Frecuencia cardíaca 102/min.</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"Observation/{{obsPAId}}\",\n          \"display\": \"Presión arterial 128/84 mmHg\"\n        },\n        {\n          \"reference\": \"Observation/{{obsTempId}}\",\n          \"display\": \"Temperatura 38,4 °C\"\n        },\n        {\n          \"reference\": \"Observation/{{obsFRId}}\",\n          \"display\": \"Frecuencia respiratoria 20/min\"\n        },\n        {\n          \"reference\": \"Observation/{{obsFCId}}\",\n          \"display\": \"Frecuencia cardíaca 102/min\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/09-documentos-clinicos/soluciones/09a_composition_signos_vitales.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"compositionId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"compositionId\", id);",
                  "console.log(\"compositionId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "09b · Documento clínico autocontenido (Bundle document)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Bundle",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Bundle\",\n  \"identifier\": {\n    \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n    \"value\": \"DOC-2025-0002\"\n  },\n  \"type\": \"document\",\n  \"timestamp\": \"2025-03-20T08:05:00-05:00\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:f2d231e7-98de-552d-a4b7-3746c969fc7d\",\n      \"resource\": {\n        \"resourceType\": \"Composition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Nota de signos vitales del 20 de marzo de 2025.</p><p>Presión arterial 128/84 mmHg; Temperatura 38,4 °C; Frecuencia respiratoria 20/min; Frecuencia cardíaca 102/min.</p></div>\"\n        },\n        \"identifier\": {\n          \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n          \"value\": \"DOC-2025-0002\"\n        },\n        \"status\": \"final\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"8716-3\",\n              \"display\": \"Vital signs note\"\n            }\n          ],\n          \"text\": \"Nota de signos vitales\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:23ec1dbb-82a6-5861-a7e6-e740e360bbd1\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"date\": \"2025-03-20T08:00:00-05:00\",\n        \"author\": [\n          {\n            \"reference\": \"urn:uuid:bcc451cc-0c62-55f2-b2ac-7bb05c17b7d3\",\n            \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n          }\n        ],\n        \"title\": \"Signos vitales - consulta del 20 de marzo de 2025\",\n        \"custodian\": {\n          \"reference\": \"urn:uuid:da2c5e11-c915-559b-8a94-5300b874e626\",\n          \"display\": \"Hospital General Docente Ejemplo\"\n        },\n        \"section\": [\n          {\n            \"title\": \"Signos vitales\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"8716-3\",\n                  \"display\": \"Vital signs note\"\n                }\n              ],\n              \"text\": \"Nota de signos vitales\"\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Presión arterial 128/84 mmHg; Temperatura 38,4 °C; Frecuencia respiratoria 20/min; Frecuencia cardíaca 102/min.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:453da060-c4e9-52ef-b373-aedfa9e26711\",\n                \"display\": \"Presión arterial 128/84 mmHg\"\n              },\n              {\n                \"reference\": \"urn:uuid:8d27fb7c-9930-53dd-a567-2f2e4ed7a846\",\n                \"display\": \"Temperatura 38,4 °C\"\n              },\n              {\n                \"reference\": \"urn:uuid:d2df19f2-5d73-5898-bfd0-e5cbb017981f\",\n                \"display\": \"Frecuencia respiratoria 20/min\"\n              },\n              {\n                \"reference\": \"urn:uuid:80d55c13-a24b-53e1-86ff-30e1ba30e878\",\n                \"display\": \"Frecuencia cardíaca 102/min\"\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:23ec1dbb-82a6-5861-a7e6-e740e360bbd1\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"NI\",\n                  \"display\": \"National unique individual identifier\"\n                }\n              ],\n              \"text\": \"Cédula de identidad\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n            \"value\": \"9900000017\"\n          },\n          {\n            \"use\": \"usual\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"MR\",\n                  \"display\": \"Medical record number\"\n                }\n              ],\n              \"text\": \"Historia clínica\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n            \"value\": \"HC-000123\"\n          }\n        ],\n        \"active\": true,\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Luis Alberto Paredes Cevallos\",\n            \"family\": \"Paredes Cevallos\",\n            \"_family\": {\n              \"extension\": [\n                {\n                  \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n                  \"valueString\": \"Paredes\"\n                },\n                {\n                  \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n                  \"valueString\": \"Cevallos\"\n                }\n              ]\n            },\n            \"given\": [\n              \"Luis\",\n              \"Alberto\"\n            ]\n          },\n          {\n            \"use\": \"usual\",\n            \"text\": \"Luis Paredes\"\n          }\n        ],\n        \"gender\": \"male\",\n        \"birthDate\": \"1979-03-12\",\n        \"address\": [\n          {\n            \"use\": \"home\",\n            \"type\": \"physical\",\n            \"line\": [\n              \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n            ],\n            \"city\": \"Quito\",\n            \"district\": \"Quito\",\n            \"state\": \"Pichincha\",\n            \"country\": \"EC\"\n          }\n        ],\n        \"communication\": [\n          {\n            \"language\": {\n              \"coding\": [\n                {\n                  \"system\": \"urn:ietf:bcp:47\",\n                  \"code\": \"es\",\n                  \"display\": \"Spanish\"\n                }\n              ],\n              \"text\": \"Español\"\n            },\n            \"preferred\": true\n          }\n        ],\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n            \"valueAddress\": {\n              \"city\": \"Riobamba\",\n              \"state\": \"Chimborazo\",\n              \"country\": \"EC\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:bcc451cc-0c62-55f2-b2ac-7bb05c17b7d3\",\n      \"resource\": {\n        \"resourceType\": \"Practitioner\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dra. Andrea Lucía Salazar Moreno, médica general. Registro profesional ficticio RP-000457.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/registro-profesional\",\n            \"value\": \"RP-000457\"\n          }\n        ],\n        \"active\": true,\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Dra. Andrea Lucía Salazar Moreno\",\n            \"prefix\": [\n              \"Dra.\"\n            ],\n            \"family\": \"Salazar Moreno\",\n            \"given\": [\n              \"Andrea\",\n              \"Lucía\"\n            ]\n          }\n        ],\n        \"telecom\": [\n          {\n            \"system\": \"email\",\n            \"value\": \"andrea.salazar@hospital-ejemplo.invalid\",\n            \"use\": \"work\"\n          }\n        ],\n        \"gender\": \"female\",\n        \"qualification\": [\n          {\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0360\",\n                  \"code\": \"MD\",\n                  \"display\": \"Doctor of Medicine\"\n                }\n              ],\n              \"text\": \"Médica\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:da2c5e11-c915-559b-8a94-5300b874e626\",\n      \"resource\": {\n        \"resourceType\": \"Organization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Hospital General Docente Ejemplo, parte de la Red de Servicios de Salud Ejemplo (ficticia).</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/establecimiento\",\n            \"value\": \"HGDE-0001\"\n          }\n        ],\n        \"active\": true,\n        \"type\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/organization-type\",\n                \"code\": \"prov\",\n                \"display\": \"Healthcare Provider\"\n              }\n            ]\n          }\n        ],\n        \"name\": \"Hospital General Docente Ejemplo\",\n        \"telecom\": [\n          {\n            \"system\": \"phone\",\n            \"value\": \"+593 2 000 0000\",\n            \"use\": \"work\"\n          }\n        ],\n        \"address\": [\n          {\n            \"line\": [\n              \"Av. Principal Ejemplo S00-00\"\n            ],\n            \"city\": \"Quito\",\n            \"state\": \"Pichincha\",\n            \"country\": \"EC\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:453da060-c4e9-52ef-b373-aedfa9e26711\",\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Presión arterial: 128/84 mmHg.</p></div>\"\n        },\n        \"status\": \"final\",\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n                \"code\": \"vital-signs\",\n                \"display\": \"Vital Signs\"\n              }\n            ]\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"85354-9\",\n              \"display\": \"Blood pressure panel with all children optional\"\n            }\n          ],\n          \"text\": \"Presión arterial\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:23ec1dbb-82a6-5861-a7e6-e740e360bbd1\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n        \"performer\": [\n          {\n            \"reference\": \"urn:uuid:bcc451cc-0c62-55f2-b2ac-7bb05c17b7d3\",\n            \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n          }\n        ],\n        \"component\": [\n          {\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"8480-6\",\n                  \"display\": \"Systolic blood pressure\"\n                }\n              ],\n              \"text\": \"Presión sistólica\"\n            },\n            \"valueQuantity\": {\n              \"value\": 128,\n              \"unit\": \"mmHg\",\n              \"system\": \"http://unitsofmeasure.org\",\n              \"code\": \"mm[Hg]\"\n            }\n          },\n          {\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"8462-4\",\n                  \"display\": \"Diastolic blood pressure\"\n                }\n              ],\n              \"text\": \"Presión diastólica\"\n            },\n            \"valueQuantity\": {\n              \"value\": 84,\n              \"unit\": \"mmHg\",\n              \"system\": \"http://unitsofmeasure.org\",\n              \"code\": \"mm[Hg]\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:8d27fb7c-9930-53dd-a567-2f2e4ed7a846\",\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Temperatura corporal: 38,4 °C.</p></div>\"\n        },\n        \"status\": \"final\",\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n                \"code\": \"vital-signs\",\n                \"display\": \"Vital Signs\"\n              }\n            ]\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"8310-5\",\n              \"display\": \"Body temperature\"\n            }\n          ],\n          \"text\": \"Temperatura corporal\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:23ec1dbb-82a6-5861-a7e6-e740e360bbd1\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n        \"performer\": [\n          {\n            \"reference\": \"urn:uuid:bcc451cc-0c62-55f2-b2ac-7bb05c17b7d3\",\n            \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n          }\n        ],\n        \"valueQuantity\": {\n          \"value\": 38.4,\n          \"unit\": \"°C\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"Cel\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:d2df19f2-5d73-5898-bfd0-e5cbb017981f\",\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Frecuencia respiratoria: 20 respiraciones por minuto.</p></div>\"\n        },\n        \"status\": \"final\",\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n                \"code\": \"vital-signs\",\n                \"display\": \"Vital Signs\"\n              }\n            ]\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"9279-1\",\n              \"display\": \"Respiratory rate\"\n            }\n          ],\n          \"text\": \"Frecuencia respiratoria\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:23ec1dbb-82a6-5861-a7e6-e740e360bbd1\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n        \"performer\": [\n          {\n            \"reference\": \"urn:uuid:bcc451cc-0c62-55f2-b2ac-7bb05c17b7d3\",\n            \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n          }\n        ],\n        \"valueQuantity\": {\n          \"value\": 20,\n          \"unit\": \"respiraciones/min\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"/min\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:80d55c13-a24b-53e1-86ff-30e1ba30e878\",\n      \"resource\": {\n        \"resourceType\": \"Observation\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Frecuencia cardíaca: 102 latidos por minuto.</p></div>\"\n        },\n        \"status\": \"final\",\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n                \"code\": \"vital-signs\",\n                \"display\": \"Vital Signs\"\n              }\n            ]\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"8867-4\",\n              \"display\": \"Heart rate\"\n            }\n          ],\n          \"text\": \"Frecuencia cardíaca\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:23ec1dbb-82a6-5861-a7e6-e740e360bbd1\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectiveDateTime\": \"2025-03-20T07:30:00-05:00\",\n        \"performer\": [\n          {\n            \"reference\": \"urn:uuid:bcc451cc-0c62-55f2-b2ac-7bb05c17b7d3\",\n            \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n          }\n        ],\n        \"valueQuantity\": {\n          \"value\": 102,\n          \"unit\": \"latidos/min\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"/min\"\n        }\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/09-documentos-clinicos/soluciones/09b_bundle_document_signos_vitales.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"bundleDocId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"bundleDocId\", id);",
                  "console.log(\"bundleDocId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "09c · Leer el documento",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Bundle/{{bundleDocId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "10 · Órdenes y derivación",
      "item": [
        {
          "name": "10a · Crear el consultorio (Location)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Location",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Location\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Consultorio 3 de Medicina General, planta baja del Hospital General Docente Ejemplo.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/ubicacion\",\n      \"value\": \"HGDE-CONS-03\"\n    }\n  ],\n  \"status\": \"active\",\n  \"name\": \"Consultorio 3 de Medicina General\",\n  \"mode\": \"instance\",\n  \"type\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n          \"code\": \"FMC\",\n          \"display\": \"Family Medicine clinic\"\n        }\n      ],\n      \"text\": \"Consulta de medicina general\"\n    }\n  ],\n  \"physicalType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/location-physical-type\",\n        \"code\": \"ro\",\n        \"display\": \"Room\"\n      }\n    ],\n    \"text\": \"Sala\"\n  },\n  \"address\": {\n    \"line\": [\n      \"Av. Principal Ejemplo S00-00\"\n    ],\n    \"city\": \"Quito\",\n    \"state\": \"Pichincha\",\n    \"country\": \"EC\"\n  },\n  \"managingOrganization\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10a_location_consultorio.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"officeLocationId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"officeLocationId\", id);",
                  "console.log(\"officeLocationId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10b · Rol de la Dra. Salazar: médica general",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/PractitionerRole",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"PractitionerRole\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dra. Andrea Lucía Salazar Moreno: médica general en el Hospital General Docente Ejemplo,</p><p>consultorio 3, de lunes a viernes de 07:00 a 13:00.</p></div>\"\n  },\n  \"active\": true,\n  \"practitioner\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"organization\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  },\n  \"code\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/practitioner-role\",\n          \"code\": \"doctor\",\n          \"display\": \"Doctor\"\n        }\n      ],\n      \"text\": \"Médica\"\n    }\n  ],\n  \"specialty\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"394814009\",\n          \"display\": \"General practice (specialty)\"\n        }\n      ],\n      \"text\": \"Medicina general\"\n    }\n  ],\n  \"location\": [\n    {\n      \"reference\": \"Location/{{officeLocationId}}\",\n      \"display\": \"Consultorio 3 de Medicina General\"\n    }\n  ],\n  \"availableTime\": [\n    {\n      \"daysOfWeek\": [\n        \"mon\",\n        \"tue\",\n        \"wed\",\n        \"thu\",\n        \"fri\"\n      ],\n      \"availableStartTime\": \"07:00:00\",\n      \"availableEndTime\": \"13:00:00\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10b_practitionerrole_medica_general.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"salazarRoleId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"salazarRoleId\", id);",
                  "console.log(\"salazarRoleId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10c · Crear al oncólogo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Practitioner",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Practitioner\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dr. Esteban Patricio Ruiz Montalvo, oncólogo clínico. Registro profesional ficticio RP-000733.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/registro-profesional\",\n      \"value\": \"RP-000733\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Dr. Esteban Patricio Ruiz Montalvo\",\n      \"prefix\": [\n        \"Dr.\"\n      ],\n      \"family\": \"Ruiz Montalvo\",\n      \"given\": [\n        \"Esteban\",\n        \"Patricio\"\n      ]\n    }\n  ],\n  \"gender\": \"male\",\n  \"qualification\": [\n    {\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0360\",\n            \"code\": \"MD\",\n            \"display\": \"Doctor of Medicine\"\n          }\n        ],\n        \"text\": \"Médico\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10c_practitioner_oncologo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"oncologistId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"oncologistId\", id);",
                  "console.log(\"oncologistId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10d · Rol del oncólogo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/PractitionerRole",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"PractitionerRole\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dr. Esteban Patricio Ruiz Montalvo: oncólogo clínico en el Hospital General Docente Ejemplo.</p></div>\"\n  },\n  \"active\": true,\n  \"practitioner\": {\n    \"reference\": \"Practitioner/{{oncologistId}}\",\n    \"display\": \"Dr. Esteban Patricio Ruiz Montalvo\"\n  },\n  \"organization\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  },\n  \"code\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/practitioner-role\",\n          \"code\": \"doctor\",\n          \"display\": \"Doctor\"\n        }\n      ],\n      \"text\": \"Médico\"\n    }\n  ],\n  \"specialty\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"394593009\",\n          \"display\": \"Medical oncology\"\n        }\n      ],\n      \"text\": \"Oncología clínica\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10d_practitionerrole_oncologo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"oncologistRoleId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"oncologistRoleId\", id);",
                  "console.log(\"oncologistRoleId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10e · Consulta por el nódulo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Encounter",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Encounter\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Consulta por nódulo en la mama izquierda, 22 de abril de 2025, 08:00 a 08:30, consultorio 3.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/encuentro\",\n      \"value\": \"ENC-2025-0003\"\n    }\n  ],\n  \"status\": \"finished\",\n  \"class\": {\n    \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ActCode\",\n    \"code\": \"AMB\",\n    \"display\": \"ambulatory\"\n  },\n  \"serviceType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/service-type\",\n        \"code\": \"124\",\n        \"display\": \"General Practice\"\n      }\n    ],\n    \"text\": \"Medicina general\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"participant\": [\n    {\n      \"type\": [\n        {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ParticipationType\",\n              \"code\": \"ATND\",\n              \"display\": \"attender\"\n            }\n          ]\n        }\n      ],\n      \"individual\": {\n        \"reference\": \"PractitionerRole/{{salazarRoleId}}\",\n        \"display\": \"Dra. Salazar · Medicina general\"\n      }\n    }\n  ],\n  \"period\": {\n    \"start\": \"2025-04-22T08:00:00-05:00\",\n    \"end\": \"2025-04-22T08:30:00-05:00\"\n  },\n  \"reasonCode\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"89164003\",\n          \"display\": \"Breast lump\"\n        }\n      ],\n      \"text\": \"Nódulo en la mama izquierda\"\n    }\n  ],\n  \"location\": [\n    {\n      \"location\": {\n        \"reference\": \"Location/{{officeLocationId}}\",\n        \"display\": \"Consultorio 3 de Medicina General\"\n      }\n    }\n  ],\n  \"serviceProvider\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10e_encounter_consulta_nodulo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"noduleEncounterId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"noduleEncounterId\", id);",
                  "console.log(\"noduleEncounterId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10f · Orden de ecografía",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ServiceRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"ServiceRequest\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Orden: ecografía de mama izquierda, prioridad urgente.</p><p>Motivo: nódulo palpable de 2 cm en el cuadrante superior externo.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/orden\",\n      \"value\": \"ORD-2025-0101\"\n    }\n  ],\n  \"status\": \"completed\",\n  \"intent\": \"order\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"363679005\",\n          \"display\": \"Imaging\"\n        }\n      ],\n      \"text\": \"Imagenología\"\n    }\n  ],\n  \"priority\": \"urgent\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"47079000\",\n        \"display\": \"Ultrasonography of breast\"\n      }\n    ],\n    \"text\": \"Ecografía de mama\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{noduleEncounterId}}\",\n    \"display\": \"Consulta por nódulo mamario, 22 de abril de 2025\"\n  },\n  \"authoredOn\": \"2025-04-22T08:20:00-05:00\",\n  \"requester\": {\n    \"reference\": \"PractitionerRole/{{salazarRoleId}}\",\n    \"display\": \"Dra. Salazar · Medicina general\"\n  },\n  \"bodySite\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  ],\n  \"reasonCode\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"89164003\",\n          \"display\": \"Breast lump\"\n        }\n      ],\n      \"text\": \"Nódulo palpable en la mama izquierda\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10f_servicerequest_ecografia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"ultrasoundRequestId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"ultrasoundRequestId\", id);",
                  "console.log(\"ultrasoundRequestId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10g · Informe de la ecografía (BI-RADS 4)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/DiagnosticReport",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"DiagnosticReport\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Ecografía de mama izquierda (25 de abril de 2025): nódulo sólido, irregular, de 2,4 cm, BI-RADS 4.</p><p>Se recomienda biopsia.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/informe\",\n      \"value\": \"INF-IMG-2025-0212\"\n    }\n  ],\n  \"basedOn\": [\n    {\n      \"reference\": \"ServiceRequest/{{ultrasoundRequestId}}\",\n      \"display\": \"Orden de ecografía de mama\"\n    }\n  ],\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\n          \"code\": \"RAD\",\n          \"display\": \"Radiology\"\n        }\n      ],\n      \"text\": \"Imagenología\"\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"24601-7\",\n        \"display\": \"US Breast\"\n      }\n    ],\n    \"text\": \"Ecografía de mama\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2025-04-25T10:00:00-05:00\",\n  \"issued\": \"2025-04-25T12:00:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Organization/{{hospitalId}}\",\n      \"display\": \"Hospital General Docente Ejemplo\"\n    }\n  ],\n  \"conclusion\": \"Nódulo sólido de bordes irregulares de 2,4 cm en el cuadrante superior externo de la mama izquierda. BI-RADS 4: sospechoso. Se recomienda biopsia.\",\n  \"conclusionCode\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"89164003\",\n          \"display\": \"Breast lump\"\n        }\n      ],\n      \"text\": \"Nódulo mamario sospechoso\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10g_diagnosticreport_ecografia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"ultrasoundReportId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"ultrasoundReportId\", id);",
                  "console.log(\"ultrasoundReportId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10h · Orden de biopsia",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ServiceRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"ServiceRequest\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Orden: biopsia del nódulo de la mama izquierda con estudio de anatomía patológica.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/orden\",\n      \"value\": \"ORD-2025-0102\"\n    }\n  ],\n  \"status\": \"completed\",\n  \"intent\": \"order\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"108252007\",\n          \"display\": \"Laboratory procedure\"\n        }\n      ],\n      \"text\": \"Procedimiento de laboratorio\"\n    }\n  ],\n  \"priority\": \"urgent\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"122548005\",\n        \"display\": \"Biopsy of breast\"\n      }\n    ],\n    \"text\": \"Biopsia de mama\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{noduleEncounterId}}\",\n    \"display\": \"Consulta por nódulo mamario, 22 de abril de 2025\"\n  },\n  \"authoredOn\": \"2025-04-28T09:00:00-05:00\",\n  \"requester\": {\n    \"reference\": \"PractitionerRole/{{salazarRoleId}}\",\n    \"display\": \"Dra. Salazar · Medicina general\"\n  },\n  \"bodySite\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"DiagnosticReport/{{ultrasoundReportId}}\",\n      \"display\": \"Ecografía BI-RADS 4\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10h_servicerequest_biopsia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"biopsyRequestId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"biopsyRequestId\", id);",
                  "console.log(\"biopsyRequestId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10i · Derivación a oncología",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ServiceRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"ServiceRequest\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Derivación a Oncología Clínica por nódulo mamario BI-RADS 4 en estudio.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/orden\",\n      \"value\": \"ORD-2025-0103\"\n    }\n  ],\n  \"status\": \"active\",\n  \"intent\": \"order\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"3457005\",\n          \"display\": \"Patient referral\"\n        }\n      ],\n      \"text\": \"Derivación\"\n    }\n  ],\n  \"priority\": \"urgent\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"3457005\",\n        \"display\": \"Patient referral\"\n      }\n    ],\n    \"text\": \"Derivación a Oncología Clínica\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"encounter\": {\n    \"reference\": \"Encounter/{{noduleEncounterId}}\",\n    \"display\": \"Consulta por nódulo mamario, 22 de abril de 2025\"\n  },\n  \"authoredOn\": \"2025-04-28T09:05:00-05:00\",\n  \"requester\": {\n    \"reference\": \"PractitionerRole/{{salazarRoleId}}\",\n    \"display\": \"Dra. Salazar · Medicina general\"\n  },\n  \"performerType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"394593009\",\n        \"display\": \"Medical oncology\"\n      }\n    ],\n    \"text\": \"Oncología clínica\"\n  },\n  \"performer\": [\n    {\n      \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n      \"display\": \"Dr. Ruiz · Oncología clínica\"\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"DiagnosticReport/{{ultrasoundReportId}}\",\n      \"display\": \"Ecografía BI-RADS 4\"\n    }\n  ],\n  \"supportingInfo\": [\n    {\n      \"reference\": \"FamilyMemberHistory/{{motherHistoryId}}\",\n      \"display\": \"Madre con cáncer de mama a los 52 años\"\n    }\n  ],\n  \"note\": [\n    {\n      \"text\": \"Paciente varón de 46 años con nódulo sospechoso y madre con cáncer de mama. Se solicita valoración prioritaria.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/soluciones/10i_servicerequest_derivacion.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"referralId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"referralId\", id);",
                  "console.log(\"referralId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "10j · Órdenes del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ServiceRequest?subject=Patient/{{patientId}}&_sort=authored"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "10k · Lo que se hizo con cada orden (_revinclude)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ServiceRequest?subject=Patient/{{patientId}}&_revinclude=DiagnosticReport:based-on"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "10l · Profesionales de oncología del hospital",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/PractitionerRole?specialty=http://snomed.info/sct|394593009&_include=PractitionerRole:practitioner"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "10m · Error a propósito: prioridad en español",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ServiceRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"ServiceRequest\",\n  \"status\": \"active\",\n  \"intent\": \"order\",\n  \"priority\": \"urgente\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"47079000\",\n        \"display\": \"Ultrasonography of breast\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/10-ordenes-y-derivacion/errores/10e1_prioridad_en_espanol.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "11 · Anatomía patológica",
      "item": [
        {
          "name": "11a · Registrar el tumor (BodyStructure)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/BodyStructure",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"BodyStructure\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Tumor primario en mama izquierda: carcinoma ductal infiltrante.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/estructura-corporal\",\n      \"value\": \"EC-2025-0001\"\n    }\n  ],\n  \"active\": true,\n  \"morphology\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"82711006\",\n        \"display\": \"Infiltrating duct carcinoma\"\n      }\n    ],\n    \"text\": \"Carcinoma ductal infiltrante\"\n  },\n  \"location\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"80248007\",\n        \"display\": \"Left breast structure\"\n      }\n    ],\n    \"text\": \"Mama izquierda\"\n  },\n  \"description\": \"Carcinoma ductal infiltrante primario de mama izquierda\",\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11a_bodystructure_tumor.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"bodyStructureId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"bodyStructureId\", id);",
                  "console.log(\"bodyStructureId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "11b · Precisar la ubicación del tumor",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/BodyStructure/{{bodyStructureId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"BodyStructure\",\n  \"id\": \"{{bodyStructureId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Tumor primario en mama izquierda: carcinoma ductal infiltrante.</p><p>Ubicación precisada: cuadrante superior externo.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/estructura-corporal\",\n      \"value\": \"EC-2025-0001\"\n    }\n  ],\n  \"active\": true,\n  \"morphology\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"82711006\",\n        \"display\": \"Infiltrating duct carcinoma\"\n      }\n    ],\n    \"text\": \"Carcinoma ductal infiltrante\"\n  },\n  \"location\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"80248007\",\n        \"display\": \"Left breast structure\"\n      }\n    ],\n    \"text\": \"Mama izquierda\"\n  },\n  \"description\": \"Carcinoma ductal infiltrante primario de mama izquierda, cuadrante superior externo\",\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"locationQualifier\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"7771000\",\n          \"display\": \"Left\"\n        }\n      ],\n      \"text\": \"Izquierdo\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11b_bodystructure_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "11c · Registrar la biopsia (Specimen)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Specimen",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Specimen\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Biopsia de tejido tumoral de mama izquierda (AP-2025-0457). Estado: available.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/muestra\",\n      \"value\": \"AP-2025-0457\"\n    }\n  ],\n  \"status\": \"available\",\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"258435002\",\n        \"display\": \"Tumor tissue sample\"\n      }\n    ],\n    \"text\": \"Tejido tumoral\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"request\": [\n    {\n      \"reference\": \"ServiceRequest/{{biopsyRequestId}}\",\n      \"display\": \"Orden de biopsia de mama\"\n    }\n  ],\n  \"receivedTime\": \"2025-05-06T10:30:00-05:00\",\n  \"collection\": {\n    \"collector\": {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    },\n    \"collectedDateTime\": \"2025-05-06T09:00:00-05:00\",\n    \"method\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"129314006\",\n          \"display\": \"Biopsy - action\"\n        }\n      ],\n      \"text\": \"Biopsia\"\n    },\n    \"bodySite\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11c_specimen_crear.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"specimenId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"specimenId\", id);",
                  "console.log(\"specimenId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "11d · Marcar la muestra como agotada",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Specimen/{{specimenId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Specimen\",\n  \"id\": \"{{specimenId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Biopsia de tejido tumoral de mama izquierda (AP-2025-0457). Estado: unavailable.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/muestra\",\n      \"value\": \"AP-2025-0457\"\n    }\n  ],\n  \"status\": \"unavailable\",\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"258435002\",\n        \"display\": \"Tumor tissue sample\"\n      }\n    ],\n    \"text\": \"Tejido tumoral\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"request\": [\n    {\n      \"reference\": \"ServiceRequest/{{biopsyRequestId}}\",\n      \"display\": \"Orden de biopsia de mama\"\n    }\n  ],\n  \"receivedTime\": \"2025-05-06T10:30:00-05:00\",\n  \"collection\": {\n    \"collector\": {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    },\n    \"collectedDateTime\": \"2025-05-06T09:00:00-05:00\",\n    \"method\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"129314006\",\n          \"display\": \"Biopsy - action\"\n        }\n      ],\n      \"text\": \"Biopsia\"\n    },\n    \"bodySite\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  },\n  \"note\": [\n    {\n      \"text\": \"Muestra agotada tras los estudios de inmunohistoquímica.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11d_specimen_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "11e · Tamaño del tumor: 2,5 cm",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Tamaño del tumor: 2,5 cm. Estado: final.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"263605001\",\n        \"display\": \"Length dimension of neoplasm\"\n      }\n    ],\n    \"text\": \"Tamaño del tumor\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"focus\": [\n    {\n      \"reference\": \"BodyStructure/{{bodyStructureId}}\",\n      \"display\": \"Tumor de mama izquierda\"\n    }\n  ],\n  \"effectiveDateTime\": \"2025-05-08\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueQuantity\": {\n    \"value\": 2.5,\n    \"unit\": \"cm\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"cm\"\n  },\n  \"bodySite\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"80248007\",\n        \"display\": \"Left breast structure\"\n      }\n    ],\n    \"text\": \"Mama izquierda\"\n  },\n  \"specimen\": {\n    \"reference\": \"Specimen/{{specimenId}}\",\n    \"display\": \"Biopsia AP-2025-0457\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11e_observation_tamano_tumor.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsTumorId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsTumorId\", id);",
                  "console.log(\"obsTumorId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "11f · Error a propósito: actualizar sin id",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation/{{obsTumorId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"status\": \"amended\",\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"263605001\",\n        \"display\": \"Length dimension of neoplasm\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"valueQuantity\": {\n    \"value\": 3.5,\n    \"unit\": \"cm\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"cm\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/errores/11e1_actualizar_sin_id.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        },
        {
          "name": "11g · Corregir el tamaño a 3,5 cm (amended)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation/{{obsTumorId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"id\": \"{{obsTumorId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Tamaño del tumor: 3,5 cm. Estado: amended.</p></div>\"\n  },\n  \"status\": \"amended\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"263605001\",\n        \"display\": \"Length dimension of neoplasm\"\n      }\n    ],\n    \"text\": \"Tamaño del tumor\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"focus\": [\n    {\n      \"reference\": \"BodyStructure/{{bodyStructureId}}\",\n      \"display\": \"Tumor de mama izquierda\"\n    }\n  ],\n  \"effectiveDateTime\": \"2025-05-08\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueQuantity\": {\n    \"value\": 3.5,\n    \"unit\": \"cm\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"cm\"\n  },\n  \"bodySite\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"80248007\",\n        \"display\": \"Left breast structure\"\n      }\n    ],\n    \"text\": \"Mama izquierda\"\n  },\n  \"specimen\": {\n    \"reference\": \"Specimen/{{specimenId}}\",\n    \"display\": \"Biopsia AP-2025-0457\"\n  },\n  \"note\": [\n    {\n      \"text\": \"Corrección: la medición inicial de 2,5 cm se rectifica a 3,5 cm tras la revisión de la pieza.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11f_observation_tamano_tumor_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "11h · Historial del tamaño del tumor",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation/{{obsTumorId}}/_history"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "11i · Receptor de estrógeno positivo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Receptor de estrógeno: positivo.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"85337-4\",\n        \"display\": \"Estrogen receptor Ag [Presence] in Breast cancer specimen by Immune stain\"\n      }\n    ],\n    \"text\": \"Receptor de estrógeno\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2025-05-12\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"10828004\",\n        \"display\": \"Positive\"\n      }\n    ],\n    \"text\": \"Positivo\"\n  },\n  \"specimen\": {\n    \"reference\": \"Specimen/{{specimenId}}\",\n    \"display\": \"Biopsia AP-2025-0457\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11g_observation_receptor_estrogeno.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsREId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsREId\", id);",
                  "console.log(\"obsREId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "11j · Ampliar el resultado del receptor (amended)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation/{{obsREId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"id\": \"{{obsREId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Receptor de estrógeno: positivo.</p><p>90 % de células tumorales, puntuación de Allred 8.</p></div>\"\n  },\n  \"status\": \"amended\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"laboratory\",\n          \"display\": \"Laboratory\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"85337-4\",\n        \"display\": \"Estrogen receptor Ag [Presence] in Breast cancer specimen by Immune stain\"\n      }\n    ],\n    \"text\": \"Receptor de estrógeno\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2025-05-12\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"10828004\",\n        \"display\": \"Positive\"\n      }\n    ],\n    \"text\": \"Positivo\"\n  },\n  \"specimen\": {\n    \"reference\": \"Specimen/{{specimenId}}\",\n    \"display\": \"Biopsia AP-2025-0457\"\n  },\n  \"interpretation\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation\",\n          \"code\": \"POS\",\n          \"display\": \"Positive\"\n        }\n      ]\n    }\n  ],\n  \"note\": [\n    {\n      \"text\": \"Positivo en el 90 % de las células tumorales, intensidad fuerte (Allred 8/8).\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11h_observation_receptor_estrogeno_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "11k · Informe de anatomía patológica",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/DiagnosticReport",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"DiagnosticReport\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Informe de anatomía patológica: carcinoma ductal infiltrante de mama izquierda de 3,5 cm,</p><p>receptor de estrógeno positivo (Allred 8).</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/informe\",\n      \"value\": \"INF-AP-2025-0457\"\n    }\n  ],\n  \"basedOn\": [\n    {\n      \"reference\": \"ServiceRequest/{{biopsyRequestId}}\",\n      \"display\": \"Orden de biopsia de mama\"\n    }\n  ],\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\n          \"code\": \"SP\",\n          \"display\": \"Surgical Pathology\"\n        }\n      ],\n      \"text\": \"Anatomía patológica\"\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"11526-1\",\n        \"display\": \"Pathology study\"\n      }\n    ],\n    \"text\": \"Estudio de patología\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2025-05-12\",\n  \"issued\": \"2025-05-13T12:00:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Organization/{{hospitalId}}\",\n      \"display\": \"Hospital General Docente Ejemplo\"\n    }\n  ],\n  \"resultsInterpreter\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"specimen\": [\n    {\n      \"reference\": \"Specimen/{{specimenId}}\",\n      \"display\": \"Biopsia AP-2025-0457\"\n    }\n  ],\n  \"result\": [\n    {\n      \"reference\": \"Observation/{{obsTumorId}}\",\n      \"display\": \"Tamaño del tumor 3,5 cm\"\n    },\n    {\n      \"reference\": \"Observation/{{obsREId}}\",\n      \"display\": \"Receptor de estrógeno positivo\"\n    }\n  ],\n  \"conclusion\": \"Carcinoma ductal infiltrante de mama izquierda, 3,5 cm, receptor de estrógeno positivo.\",\n  \"conclusionCode\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"254837009\",\n          \"display\": \"Malignant neoplasm of breast\"\n        }\n      ],\n      \"text\": \"Cáncer de mama\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11i_diagnosticreport_patologia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"diagnosticReportId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"diagnosticReportId\", id);",
                  "console.log(\"diagnosticReportId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "11l · Diagnóstico de cáncer de mama",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Condition",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Condition\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carcinoma ductal infiltrante de mama izquierda (activo, confirmado).</p><p>Diagnóstico: 13 de mayo de 2025.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/condicion\",\n      \"value\": \"COND-2025-0002\"\n    }\n  ],\n  \"clinicalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n        \"code\": \"active\",\n        \"display\": \"Active\"\n      }\n    ]\n  },\n  \"verificationStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\n        \"code\": \"confirmed\",\n        \"display\": \"Confirmed\"\n      }\n    ]\n  },\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n          \"code\": \"problem-list-item\",\n          \"display\": \"Problem List Item\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://hl7.org/fhir/sid/icd-10\",\n        \"code\": \"C50.9\",\n        \"display\": \"Breast, unspecified\"\n      },\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"254837009\",\n        \"display\": \"Malignant neoplasm of breast\"\n      }\n    ],\n    \"text\": \"Carcinoma ductal infiltrante de mama izquierda\"\n  },\n  \"bodySite\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  ],\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"onsetDateTime\": \"2025-05-13\",\n  \"recordedDate\": \"2025-05-13\",\n  \"recorder\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"evidence\": [\n    {\n      \"detail\": [\n        {\n          \"reference\": \"DiagnosticReport/{{diagnosticReportId}}\",\n          \"display\": \"Informe de patología AP-2025-0457\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/11-anatomia-patologica/soluciones/11j_condition_cancer_mama.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"conditionCancerId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"conditionCancerId\", id);",
                  "console.log(\"conditionCancerId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "11m · Informe con sus resultados incluidos",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/DiagnosticReport?subject=Patient/{{patientId}}&_include=DiagnosticReport:result"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "12 · Plan y consentimiento",
      "item": [
        {
          "name": "12a · Comité de tumores (CareTeam)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/CareTeam",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"CareTeam\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Comité de tumores de mama del Hospital General Docente Ejemplo:</p><p>Dr. Ruiz (oncología clínica, coordinador) y Dra. Salazar (medicina general).</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/equipo\",\n      \"value\": \"CT-MAMA-0001\"\n    }\n  ],\n  \"status\": \"active\",\n  \"name\": \"Comité de tumores de mama\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"period\": {\n    \"start\": \"2025-05-20\"\n  },\n  \"participant\": [\n    {\n      \"role\": [\n        {\n          \"text\": \"Oncólogo clínico, coordinador del comité\"\n        }\n      ],\n      \"member\": {\n        \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n        \"display\": \"Dr. Ruiz · Oncología clínica\"\n      }\n    },\n    {\n      \"role\": [\n        {\n          \"text\": \"Médica de cabecera\"\n        }\n      ],\n      \"member\": {\n        \"reference\": \"PractitionerRole/{{salazarRoleId}}\",\n        \"display\": \"Dra. Salazar · Medicina general\"\n      }\n    }\n  ],\n  \"managingOrganization\": [\n    {\n      \"reference\": \"Organization/{{hospitalId}}\",\n      \"display\": \"Hospital General Docente Ejemplo\"\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/12-plan-y-consentimiento/soluciones/12a_careteam_comite.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"careTeamId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"careTeamId\", id);",
                  "console.log(\"careTeamId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "12b · Meta: sin evidencia de enfermedad",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Goal",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Goal\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Meta: sin evidencia de enfermedad al terminar el tratamiento.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/meta\",\n      \"value\": \"META-0001\"\n    }\n  ],\n  \"lifecycleStatus\": \"active\",\n  \"achievementStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/goal-achievement\",\n        \"code\": \"in-progress\",\n        \"display\": \"In Progress\"\n      }\n    ],\n    \"text\": \"En curso\"\n  },\n  \"priority\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/goal-priority\",\n        \"code\": \"high-priority\",\n        \"display\": \"High Priority\"\n      }\n    ],\n    \"text\": \"Alta\"\n  },\n  \"description\": {\n    \"text\": \"Sin evidencia de enfermedad al terminar el tratamiento\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"startDate\": \"2025-05-20\",\n  \"target\": [\n    {\n      \"dueDate\": \"2026-06-30\"\n    }\n  ],\n  \"addresses\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"expressedBy\": {\n    \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n    \"display\": \"Dr. Ruiz · Oncología clínica\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/12-plan-y-consentimiento/soluciones/12b_goal_control_enfermedad.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"goalControlId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"goalControlId\", id);",
                  "console.log(\"goalControlId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "12c · Meta: mantener la funcionalidad",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Goal",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Goal\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Meta: mantener la funcionalidad (ECOG 0 a 1) durante el tratamiento.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/meta\",\n      \"value\": \"META-0002\"\n    }\n  ],\n  \"lifecycleStatus\": \"active\",\n  \"achievementStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/goal-achievement\",\n        \"code\": \"in-progress\",\n        \"display\": \"In Progress\"\n      }\n    ],\n    \"text\": \"En curso\"\n  },\n  \"priority\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/goal-priority\",\n        \"code\": \"medium-priority\",\n        \"display\": \"Medium Priority\"\n      }\n    ],\n    \"text\": \"Media\"\n  },\n  \"description\": {\n    \"text\": \"Mantener la funcionalidad durante el tratamiento (ECOG 0 a 1)\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"startDate\": \"2025-05-20\",\n  \"target\": [\n    {\n      \"dueDate\": \"2026-06-30\"\n    }\n  ],\n  \"addresses\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"expressedBy\": {\n    \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n    \"display\": \"Dr. Ruiz · Oncología clínica\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/12-plan-y-consentimiento/soluciones/12c_goal_calidad_vida.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"goalQualityId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"goalQualityId\", id);",
                  "console.log(\"goalQualityId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "12d · Plan de tratamiento (CarePlan)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/CarePlan",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"CarePlan\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Plan de tratamiento del comité de tumores (20 de mayo de 2025):</p><p>1) mastectomía parcial; 2) quimioterapia con doxorrubicina, 4 ciclos; 3) hormonoterapia con tamoxifeno por 5 años.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/plan\",\n      \"value\": \"PLAN-2025-0001\"\n    }\n  ],\n  \"status\": \"active\",\n  \"intent\": \"plan\",\n  \"category\": [\n    {\n      \"text\": \"Plan de tratamiento oncológico\"\n    }\n  ],\n  \"title\": \"Plan de tratamiento del cáncer de mama\",\n  \"description\": \"Tratamiento acordado por el comité de tumores de mama.\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"period\": {\n    \"start\": \"2025-05-20\",\n    \"end\": \"2030-10-31\"\n  },\n  \"created\": \"2025-05-20\",\n  \"author\": {\n    \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n    \"display\": \"Dr. Ruiz · Oncología clínica\"\n  },\n  \"careTeam\": [\n    {\n      \"reference\": \"CareTeam/{{careTeamId}}\",\n      \"display\": \"Comité de tumores de mama\"\n    }\n  ],\n  \"addresses\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"goal\": [\n    {\n      \"reference\": \"Goal/{{goalControlId}}\",\n      \"display\": \"Sin evidencia de enfermedad\"\n    },\n    {\n      \"reference\": \"Goal/{{goalQualityId}}\",\n      \"display\": \"Mantener la funcionalidad\"\n    }\n  ],\n  \"activity\": [\n    {\n      \"detail\": {\n        \"kind\": \"ServiceRequest\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"64368001\",\n              \"display\": \"Partial mastectomy\"\n            }\n          ],\n          \"text\": \"Mastectomía parcial\"\n        },\n        \"status\": \"scheduled\",\n        \"scheduledPeriod\": {\n          \"start\": \"2025-06-10\",\n          \"end\": \"2025-06-10\"\n        },\n        \"performer\": [\n          {\n            \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n            \"display\": \"Dr. Ruiz · Oncología clínica\"\n          }\n        ],\n        \"description\": \"Mastectomía parcial de la mama izquierda\"\n      }\n    },\n    {\n      \"detail\": {\n        \"kind\": \"MedicationRequest\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"367336001\",\n              \"display\": \"Chemotherapy\"\n            }\n          ],\n          \"text\": \"Quimioterapia\"\n        },\n        \"status\": \"not-started\",\n        \"scheduledPeriod\": {\n          \"start\": \"2025-07-01\",\n          \"end\": \"2025-09-30\"\n        },\n        \"performer\": [\n          {\n            \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n            \"display\": \"Dr. Ruiz · Oncología clínica\"\n          }\n        ],\n        \"description\": \"Doxorrubicina 60 mg/m² cada 21 días, 4 ciclos\"\n      }\n    },\n    {\n      \"detail\": {\n        \"kind\": \"MedicationRequest\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"169413002\",\n              \"display\": \"Hormone therapy\"\n            }\n          ],\n          \"text\": \"Hormonoterapia\"\n        },\n        \"status\": \"not-started\",\n        \"scheduledPeriod\": {\n          \"start\": \"2025-10-15\",\n          \"end\": \"2030-10-15\"\n        },\n        \"performer\": [\n          {\n            \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n            \"display\": \"Dr. Ruiz · Oncología clínica\"\n          }\n        ],\n        \"description\": \"Tamoxifeno 20 mg diarios por 5 años\"\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/12-plan-y-consentimiento/soluciones/12d_careplan_oncologico.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"carePlanId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"carePlanId\", id);",
                  "console.log(\"carePlanId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "12e · Consentimiento informado para la cirugía",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Consent",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Consent\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Consentimiento informado para la mastectomía parcial de la mama izquierda,</p><p>firmado por el paciente el 27 de mayo de 2025.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/consentimiento\",\n      \"value\": \"CI-2025-0007\"\n    }\n  ],\n  \"status\": \"active\",\n  \"scope\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n        \"code\": \"treatment\",\n        \"display\": \"Treatment\"\n      }\n    ],\n    \"text\": \"Tratamiento\"\n  },\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://loinc.org\",\n          \"code\": \"59284-0\",\n          \"display\": \"Patient Consent\"\n        }\n      ],\n      \"text\": \"Consentimiento del paciente\"\n    }\n  ],\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"dateTime\": \"2025-05-27T10:00:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Patient/{{patientId}}\",\n      \"display\": \"Luis Alberto Paredes Cevallos\"\n    }\n  ],\n  \"organization\": [\n    {\n      \"reference\": \"Organization/{{hospitalId}}\",\n      \"display\": \"Hospital General Docente Ejemplo\"\n    }\n  ],\n  \"policyRule\": {\n    \"text\": \"Consentimiento informado para procedimientos quirúrgicos (normativa nacional)\"\n  },\n  \"provision\": {\n    \"type\": \"permit\",\n    \"period\": {\n      \"start\": \"2025-05-27\",\n      \"end\": \"2025-07-31\"\n    },\n    \"actor\": [\n      {\n        \"role\": {\n          \"text\": \"Equipo quirúrgico tratante\"\n        },\n        \"reference\": {\n          \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n          \"display\": \"Dr. Ruiz · Oncología clínica\"\n        }\n      }\n    ],\n    \"code\": [\n      {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"64368001\",\n            \"display\": \"Partial mastectomy\"\n          }\n        ],\n        \"text\": \"Mastectomía parcial\"\n      }\n    ]\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/12-plan-y-consentimiento/soluciones/12e_consent_cirugia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"consentId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"consentId\", id);",
                  "console.log(\"consentId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "12f · El plan con sus metas y su equipo",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/CarePlan?subject=Patient/{{patientId}}&_include=CarePlan:goal&_include=CarePlan:care-team"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "12g · Error a propósito: consentimiento sin categoría (el servidor lo acepta)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Consent",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Consent\",\n  \"status\": \"active\",\n  \"scope\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/consentscope\",\n        \"code\": \"treatment\",\n        \"display\": \"Treatment\"\n      }\n    ]\n  },\n  \"patient\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"policyRule\": {\n    \"text\": \"Consentimiento informado para procedimientos quirúrgicos (normativa nacional)\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/12-plan-y-consentimiento/errores/12e1_consentimiento_sin_categoria.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorConsentId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorConsentId\", id);",
                  "console.log(\"errorConsentId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "12h · Borrar el consentimiento inválido",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Consent/{{errorConsentId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "13 · Procedimientos",
      "item": [
        {
          "name": "13a · Mastectomía parcial",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Procedure",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Procedure\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda, 10 de junio de 2025.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/procedimiento\",\n      \"value\": \"PROC-2025-0001\"\n    }\n  ],\n  \"basedOn\": [\n    {\n      \"reference\": \"CarePlan/{{carePlanId}}\",\n      \"display\": \"Plan de tratamiento del cáncer de mama\"\n    }\n  ],\n  \"status\": \"completed\",\n  \"category\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"387713003\",\n        \"display\": \"Surgical procedure\"\n      }\n    ],\n    \"text\": \"Procedimiento quirúrgico\"\n  },\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"64368001\",\n        \"display\": \"Partial mastectomy\"\n      }\n    ],\n    \"text\": \"Mastectomía parcial\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"performedDateTime\": \"2025-06-10T08:00:00-05:00\",\n  \"recorder\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"performer\": [\n    {\n      \"actor\": {\n        \"reference\": \"Practitioner/{{practitionerId}}\",\n        \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n      },\n      \"onBehalfOf\": {\n        \"reference\": \"Organization/{{hospitalId}}\",\n        \"display\": \"Hospital General Docente Ejemplo\"\n      }\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"bodySite\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/13-procedimientos/soluciones/13a_procedure_mastectomia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"procedureId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"procedureId\", id);",
                  "console.log(\"procedureId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "13b · Agregar resultado y seguimiento",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Procedure/{{procedureId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Procedure\",\n  \"id\": \"{{procedureId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda, 10 de junio de 2025.</p><p>Resultado: exitoso. Control en 2 semanas.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/procedimiento\",\n      \"value\": \"PROC-2025-0001\"\n    }\n  ],\n  \"basedOn\": [\n    {\n      \"reference\": \"CarePlan/{{carePlanId}}\",\n      \"display\": \"Plan de tratamiento del cáncer de mama\"\n    }\n  ],\n  \"status\": \"completed\",\n  \"category\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"387713003\",\n        \"display\": \"Surgical procedure\"\n      }\n    ],\n    \"text\": \"Procedimiento quirúrgico\"\n  },\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"64368001\",\n        \"display\": \"Partial mastectomy\"\n      }\n    ],\n    \"text\": \"Mastectomía parcial\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"performedDateTime\": \"2025-06-10T08:00:00-05:00\",\n  \"recorder\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"performer\": [\n    {\n      \"actor\": {\n        \"reference\": \"Practitioner/{{practitionerId}}\",\n        \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n      },\n      \"onBehalfOf\": {\n        \"reference\": \"Organization/{{hospitalId}}\",\n        \"display\": \"Hospital General Docente Ejemplo\"\n      }\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"bodySite\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"80248007\",\n          \"display\": \"Left breast structure\"\n        }\n      ],\n      \"text\": \"Mama izquierda\"\n    }\n  ],\n  \"outcome\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"385669000\",\n        \"display\": \"Successful\"\n      }\n    ],\n    \"text\": \"Exitoso\"\n  },\n  \"followUp\": [\n    {\n      \"text\": \"Control de herida quirúrgica en 2 semanas y valoración por oncología.\"\n    }\n  ],\n  \"note\": [\n    {\n      \"text\": \"Márgenes quirúrgicos libres de tumor.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/13-procedimientos/soluciones/13b_procedure_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "14 · Citas",
      "item": [
        {
          "name": "14a · Crear el Hospital de Día de Oncología",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Location",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Location\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Hospital de Día de Oncología, segundo piso del Hospital General Docente Ejemplo.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/ubicacion\",\n      \"value\": \"HGDE-HDO\"\n    }\n  ],\n  \"status\": \"active\",\n  \"name\": \"Hospital de Día de Oncología\",\n  \"mode\": \"instance\",\n  \"type\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RoleCode\",\n          \"code\": \"ONCL\",\n          \"display\": \"Medical oncology clinic\"\n        }\n      ],\n      \"text\": \"Hospital de día de oncología\"\n    }\n  ],\n  \"physicalType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/location-physical-type\",\n        \"code\": \"wa\",\n        \"display\": \"Ward\"\n      }\n    ],\n    \"text\": \"Área\"\n  },\n  \"managingOrganization\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14a_location_hospital_dia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"dayHospitalLocationId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"dayHospitalLocationId\", id);",
                  "console.log(\"dayHospitalLocationId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14b · Agenda de quimioterapia (Schedule)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Schedule",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Schedule\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Agenda de quimioterapia del Hospital de Día de Oncología, julio a septiembre de 2025.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/agenda\",\n      \"value\": \"AG-HDO-2025-3\"\n    }\n  ],\n  \"active\": true,\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"specialty\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"394593009\",\n          \"display\": \"Medical oncology\"\n        }\n      ],\n      \"text\": \"Oncología clínica\"\n    }\n  ],\n  \"actor\": [\n    {\n      \"reference\": \"Location/{{dayHospitalLocationId}}\",\n      \"display\": \"Hospital de Día de Oncología\"\n    },\n    {\n      \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n      \"display\": \"Dr. Ruiz · Oncología clínica\"\n    }\n  ],\n  \"planningHorizon\": {\n    \"start\": \"2025-07-01T07:00:00-05:00\",\n    \"end\": \"2025-09-30T19:00:00-05:00\"\n  },\n  \"comment\": \"Sillones de quimioterapia, de lunes a viernes de 07:00 a 19:00.\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14b_schedule_quimioterapia.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"scheduleId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"scheduleId\", id);",
                  "console.log(\"scheduleId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14c · Cupo libre para el ciclo 1 (Slot)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Slot",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Slot\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cupo libre: 2 de julio de 2025, 09:00 a 11:00.</p></div>\"\n  },\n  \"schedule\": {\n    \"reference\": \"Schedule/{{scheduleId}}\",\n    \"display\": \"Agenda de quimioterapia\"\n  },\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"status\": \"free\",\n  \"start\": \"2025-07-02T09:00:00-05:00\",\n  \"end\": \"2025-07-02T11:00:00-05:00\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14c_slot_ciclo1.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"slot1Id\", id);",
                  "if (pm.environment.name) pm.environment.set(\"slot1Id\", id);",
                  "console.log(\"slot1Id = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14d · Cupos libres de la agenda",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Slot?schedule=Schedule/{{scheduleId}}&status=free"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14e · Agendar el ciclo 1 (Appointment)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Appointment\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cita: quimioterapia ciclo 1 de 4, 2 de julio de 2025, 09:00.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cita\",\n      \"value\": \"CITA-2025-QT1\"\n    }\n  ],\n  \"status\": \"booked\",\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"appointmentType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0276\",\n        \"code\": \"FOLLOWUP\",\n        \"display\": \"A follow up visit from a previous appointment\"\n      }\n    ],\n    \"text\": \"Ciclo de tratamiento\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"description\": \"Quimioterapia con doxorrubicina, ciclo 1 de 4\",\n  \"slot\": [\n    {\n      \"reference\": \"Slot/{{slot1Id}}\",\n      \"display\": \"Cupo del ciclo 1\"\n    }\n  ],\n  \"start\": \"2025-07-02T09:00:00-05:00\",\n  \"end\": \"2025-07-02T11:00:00-05:00\",\n  \"created\": \"2025-06-20T10:00:00-05:00\",\n  \"participant\": [\n    {\n      \"actor\": {\n        \"reference\": \"Patient/{{patientId}}\",\n        \"display\": \"Luis Alberto Paredes Cevallos\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n        \"display\": \"Dr. Ruiz · Oncología clínica\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"Location/{{dayHospitalLocationId}}\",\n        \"display\": \"Hospital de Día de Oncología\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14e_appointment_ciclo1.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"appointment1Id\", id);",
                  "if (pm.environment.name) pm.environment.set(\"appointment1Id\", id);",
                  "console.log(\"appointment1Id = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14f · Marcar el cupo como ocupado",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Slot/{{slot1Id}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Slot\",\n  \"id\": \"{{slot1Id}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cupo ocupado: 2 de julio de 2025, 09:00 a 11:00.</p></div>\"\n  },\n  \"schedule\": {\n    \"reference\": \"Schedule/{{scheduleId}}\",\n    \"display\": \"Agenda de quimioterapia\"\n  },\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"status\": \"busy\",\n  \"start\": \"2025-07-02T09:00:00-05:00\",\n  \"end\": \"2025-07-02T11:00:00-05:00\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14d_slot_ciclo1_ocupado.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14g · Volver a buscar cupos libres, sin caché",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Slot?schedule=Schedule/{{scheduleId}}&status=free"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14h · El paciente confirma (AppointmentResponse)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/AppointmentResponse",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"AppointmentResponse\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis confirma su asistencia a la cita del ciclo 1.</p></div>\"\n  },\n  \"appointment\": {\n    \"reference\": \"Appointment/{{appointment1Id}}\",\n    \"display\": \"Quimioterapia ciclo 1\"\n  },\n  \"actor\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"participantStatus\": \"accepted\",\n  \"comment\": \"Confirmado por teléfono el 30 de junio de 2025.\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14f_appointmentresponse_paciente.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14i · La cita se cumple",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment/{{appointment1Id}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Appointment\",\n  \"id\": \"{{appointment1Id}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cita cumplida: quimioterapia ciclo 1 de 4, 2 de julio de 2025.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cita\",\n      \"value\": \"CITA-2025-QT1\"\n    }\n  ],\n  \"status\": \"fulfilled\",\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"appointmentType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0276\",\n        \"code\": \"FOLLOWUP\",\n        \"display\": \"A follow up visit from a previous appointment\"\n      }\n    ],\n    \"text\": \"Ciclo de tratamiento\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"description\": \"Quimioterapia con doxorrubicina, ciclo 1 de 4\",\n  \"slot\": [\n    {\n      \"reference\": \"Slot/{{slot1Id}}\",\n      \"display\": \"Cupo del ciclo 1\"\n    }\n  ],\n  \"start\": \"2025-07-02T09:00:00-05:00\",\n  \"end\": \"2025-07-02T11:00:00-05:00\",\n  \"created\": \"2025-06-20T10:00:00-05:00\",\n  \"participant\": [\n    {\n      \"actor\": {\n        \"reference\": \"Patient/{{patientId}}\",\n        \"display\": \"Luis Alberto Paredes Cevallos\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n        \"display\": \"Dr. Ruiz · Oncología clínica\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"Location/{{dayHospitalLocationId}}\",\n        \"display\": \"Hospital de Día de Oncología\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14g_appointment_ciclo1_cumplida.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14j · Cupo para el ciclo 2",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Slot",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Slot\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cupo ocupado: 23 de julio de 2025, 09:00 a 11:00.</p></div>\"\n  },\n  \"schedule\": {\n    \"reference\": \"Schedule/{{scheduleId}}\",\n    \"display\": \"Agenda de quimioterapia\"\n  },\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"status\": \"busy\",\n  \"start\": \"2025-07-23T09:00:00-05:00\",\n  \"end\": \"2025-07-23T11:00:00-05:00\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14h_slot_ciclo2.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"slot2Id\", id);",
                  "if (pm.environment.name) pm.environment.set(\"slot2Id\", id);",
                  "console.log(\"slot2Id = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14k · Agendar el ciclo 2",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Appointment\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cita: quimioterapia ciclo 2 de 4, 23 de julio de 2025, 09:00.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cita\",\n      \"value\": \"CITA-2025-QT2\"\n    }\n  ],\n  \"status\": \"booked\",\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"appointmentType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0276\",\n        \"code\": \"FOLLOWUP\",\n        \"display\": \"A follow up visit from a previous appointment\"\n      }\n    ],\n    \"text\": \"Ciclo de tratamiento\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"description\": \"Quimioterapia con doxorrubicina, ciclo 2 de 4\",\n  \"slot\": [\n    {\n      \"reference\": \"Slot/{{slot2Id}}\",\n      \"display\": \"Cupo del ciclo 2\"\n    }\n  ],\n  \"start\": \"2025-07-23T09:00:00-05:00\",\n  \"end\": \"2025-07-23T11:00:00-05:00\",\n  \"created\": \"2025-06-20T10:00:00-05:00\",\n  \"participant\": [\n    {\n      \"actor\": {\n        \"reference\": \"Patient/{{patientId}}\",\n        \"display\": \"Luis Alberto Paredes Cevallos\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n        \"display\": \"Dr. Ruiz · Oncología clínica\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"Location/{{dayHospitalLocationId}}\",\n        \"display\": \"Hospital de Día de Oncología\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14i_appointment_ciclo2.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"appointment2Id\", id);",
                  "if (pm.environment.name) pm.environment.set(\"appointment2Id\", id);",
                  "console.log(\"appointment2Id = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14l · Cancelar el ciclo 2 por neutropenia",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment/{{appointment2Id}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Appointment\",\n  \"id\": \"{{appointment2Id}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cita cancelada: ciclo 2 del 23 de julio de 2025, por neutropenia. Se reprograma.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cita\",\n      \"value\": \"CITA-2025-QT2\"\n    }\n  ],\n  \"status\": \"cancelled\",\n  \"serviceType\": [\n    {\n      \"text\": \"Quimioterapia ambulatoria\"\n    }\n  ],\n  \"appointmentType\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0276\",\n        \"code\": \"FOLLOWUP\",\n        \"display\": \"A follow up visit from a previous appointment\"\n      }\n    ],\n    \"text\": \"Ciclo de tratamiento\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"description\": \"Quimioterapia con doxorrubicina, ciclo 2 de 4\",\n  \"slot\": [\n    {\n      \"reference\": \"Slot/{{slot2Id}}\",\n      \"display\": \"Cupo del ciclo 2\"\n    }\n  ],\n  \"start\": \"2025-07-23T09:00:00-05:00\",\n  \"end\": \"2025-07-23T11:00:00-05:00\",\n  \"created\": \"2025-06-20T10:00:00-05:00\",\n  \"participant\": [\n    {\n      \"actor\": {\n        \"reference\": \"Patient/{{patientId}}\",\n        \"display\": \"Luis Alberto Paredes Cevallos\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n        \"display\": \"Dr. Ruiz · Oncología clínica\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    },\n    {\n      \"actor\": {\n        \"reference\": \"Location/{{dayHospitalLocationId}}\",\n        \"display\": \"Hospital de Día de Oncología\"\n      },\n      \"required\": \"required\",\n      \"status\": \"accepted\"\n    }\n  ],\n  \"cancelationReason\": {\n    \"text\": \"Neutropenia: el recuento de neutrófilos no permite administrar el ciclo\"\n  },\n  \"comment\": \"Se reprograma para el 30 de julio, con un nuevo control de hemograma.\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/soluciones/14j_appointment_ciclo2_cancelada.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14m · Citas del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment?patient=Patient/{{patientId}}&_sort=date"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "14n · Error a propósito: cita sin participantes (el servidor la acepta)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Appointment\",\n  \"status\": \"booked\",\n  \"start\": \"2025-07-30T09:00:00-05:00\",\n  \"end\": \"2025-07-30T11:00:00-05:00\",\n  \"description\": \"Quimioterapia con doxorrubicina, ciclo 2 de 4 (reprogramado)\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/14-citas/errores/14e1_cita_sin_participantes.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorAppointmentId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorAppointmentId\", id);",
                  "console.log(\"errorAppointmentId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "14o · Borrar la cita inválida",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Appointment/{{errorAppointmentId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "15 · Medicamentos",
      "item": [
        {
          "name": "15a · Superficie corporal",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Superficie corporal: 1,77 m² (peso 72 kg, talla 1,57 m; Mosteller).</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"vital-signs\",\n          \"display\": \"Vital Signs\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"8277-6\",\n        \"display\": \"Body surface area\"\n      }\n    ],\n    \"text\": \"Superficie corporal\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2025-07-01\",\n  \"performer\": [\n    {\n      \"reference\": \"Practitioner/{{practitionerId}}\",\n      \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n    }\n  ],\n  \"valueQuantity\": {\n    \"value\": 1.77,\n    \"unit\": \"m2\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"m2\"\n  },\n  \"method\": {\n    \"text\": \"Fórmula de Mosteller\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15a_observation_superficie_corporal.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"obsBSAId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"obsBSAId\", id);",
                  "console.log(\"obsBSAId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "15b · Prescribir doxorrubicina",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Doxorrubicina 60 mg/m² (106,2 mg) IV cada 21 días, 4 ciclos.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/receta\",\n      \"value\": \"RX-2025-0101\"\n    }\n  ],\n  \"status\": \"active\",\n  \"intent\": \"order\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/medicationrequest-category\",\n          \"code\": \"outpatient\",\n          \"display\": \"Outpatient\"\n        }\n      ]\n    }\n  ],\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"372817009\",\n        \"display\": \"Doxorubicin\"\n      }\n    ],\n    \"text\": \"Doxorrubicina\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"authoredOn\": \"2025-07-01\",\n  \"requester\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"supportingInformation\": [\n    {\n      \"reference\": \"Observation/{{obsBSAId}}\",\n      \"display\": \"Superficie corporal 1,77 m²\"\n    }\n  ],\n  \"dosageInstruction\": [\n    {\n      \"text\": \"60 mg/m² (106,2 mg) por vía intravenosa cada 21 días, 4 ciclos\",\n      \"timing\": {\n        \"repeat\": {\n          \"count\": 4,\n          \"frequency\": 1,\n          \"period\": 21,\n          \"periodUnit\": \"d\"\n        }\n      },\n      \"route\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"47625008\",\n            \"display\": \"Intravenous route\"\n          }\n        ],\n        \"text\": \"Vía intravenosa\"\n      },\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": 106.2,\n            \"unit\": \"mg\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"mg\"\n          }\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15b_medicationrequest_doxorrubicina.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"medReqDoxoId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"medReqDoxoId\", id);",
                  "console.log(\"medReqDoxoId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "15c · Administrar el primer ciclo",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationAdministration",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationAdministration\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Primer ciclo de doxorrubicina: 106,2 mg IV en 30 minutos, 2 de julio de 2025.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"category\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/medication-admin-category\",\n        \"code\": \"outpatient\",\n        \"display\": \"Outpatient\"\n      }\n    ]\n  },\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"372817009\",\n        \"display\": \"Doxorubicin\"\n      }\n    ],\n    \"text\": \"Doxorrubicina\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectivePeriod\": {\n    \"start\": \"2025-07-02T09:00:00-05:00\",\n    \"end\": \"2025-07-02T09:30:00-05:00\"\n  },\n  \"performer\": [\n    {\n      \"actor\": {\n        \"reference\": \"Practitioner/{{practitionerId}}\",\n        \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n      }\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"request\": {\n    \"reference\": \"MedicationRequest/{{medReqDoxoId}}\",\n    \"display\": \"Doxorrubicina 60 mg/m²\"\n  },\n  \"supportingInformation\": [\n    {\n      \"reference\": \"Observation/{{obsBSAId}}\",\n      \"display\": \"Superficie corporal 1,77 m²\"\n    }\n  ],\n  \"dosage\": {\n    \"text\": \"106,2 mg diluidos en 100 mL de solución salina, en 30 minutos\",\n    \"route\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"47625008\",\n          \"display\": \"Intravenous route\"\n        }\n      ],\n      \"text\": \"Vía intravenosa\"\n    },\n    \"dose\": {\n      \"value\": 106.2,\n      \"unit\": \"mg\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"mg\"\n    },\n    \"rateQuantity\": {\n      \"value\": 200,\n      \"unit\": \"mL/h\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"mL/h\"\n    }\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15c_medicationadministration_doxorrubicina.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"medAdminDoxoId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"medAdminDoxoId\", id);",
                  "console.log(\"medAdminDoxoId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "15d · Registrar un evento posterior a la infusión",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationAdministration/{{medAdminDoxoId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationAdministration\",\n  \"id\": \"{{medAdminDoxoId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Primer ciclo de doxorrubicina: 106,2 mg IV en 30 minutos, 2 de julio de 2025.</p><p>Evento posterior: náuseas grado 1, tratadas con ondansetrón.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"category\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/medication-admin-category\",\n        \"code\": \"outpatient\",\n        \"display\": \"Outpatient\"\n      }\n    ]\n  },\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"372817009\",\n        \"display\": \"Doxorubicin\"\n      }\n    ],\n    \"text\": \"Doxorrubicina\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectivePeriod\": {\n    \"start\": \"2025-07-02T09:00:00-05:00\",\n    \"end\": \"2025-07-02T09:30:00-05:00\"\n  },\n  \"performer\": [\n    {\n      \"actor\": {\n        \"reference\": \"Practitioner/{{practitionerId}}\",\n        \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n      }\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"request\": {\n    \"reference\": \"MedicationRequest/{{medReqDoxoId}}\",\n    \"display\": \"Doxorrubicina 60 mg/m²\"\n  },\n  \"supportingInformation\": [\n    {\n      \"reference\": \"Observation/{{obsBSAId}}\",\n      \"display\": \"Superficie corporal 1,77 m²\"\n    }\n  ],\n  \"dosage\": {\n    \"text\": \"106,2 mg diluidos en 100 mL de solución salina, en 30 minutos\",\n    \"route\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"47625008\",\n          \"display\": \"Intravenous route\"\n        }\n      ],\n      \"text\": \"Vía intravenosa\"\n    },\n    \"dose\": {\n      \"value\": 106.2,\n      \"unit\": \"mg\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"mg\"\n    },\n    \"rateQuantity\": {\n      \"value\": 200,\n      \"unit\": \"mL/h\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"mL/h\"\n    }\n  },\n  \"note\": [\n    {\n      \"time\": \"2025-07-02T11:00:00-05:00\",\n      \"text\": \"Náuseas grado 1 dos horas después de la infusión; se administró ondansetrón 8 mg VO.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15d_medicationadministration_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "15e · Prescribir tamoxifeno",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Tamoxifeno 20 mg por vía oral una vez al día.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/receta\",\n      \"value\": \"RX-2025-0207\"\n    }\n  ],\n  \"status\": \"active\",\n  \"intent\": \"order\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/medicationrequest-category\",\n          \"code\": \"outpatient\",\n          \"display\": \"Outpatient\"\n        }\n      ]\n    }\n  ],\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"373345002\",\n        \"display\": \"Tamoxifen\"\n      }\n    ],\n    \"text\": \"Tamoxifeno\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"authoredOn\": \"2025-10-15\",\n  \"requester\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"dosageInstruction\": [\n    {\n      \"text\": \"20 mg por vía oral una vez al día, durante 5 años\",\n      \"timing\": {\n        \"repeat\": {\n          \"frequency\": 1,\n          \"period\": 1,\n          \"periodUnit\": \"d\",\n          \"boundsDuration\": {\n            \"value\": 5,\n            \"unit\": \"años\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"a\"\n          }\n        }\n      },\n      \"route\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"26643006\",\n            \"display\": \"Oral route\"\n          }\n        ],\n        \"text\": \"Vía oral\"\n      },\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": 20,\n            \"unit\": \"mg\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"mg\"\n          }\n        }\n      ]\n    }\n  ],\n  \"dispenseRequest\": {\n    \"numberOfRepeatsAllowed\": 11,\n    \"quantity\": {\n      \"value\": 30,\n      \"unit\": \"comprimidos\"\n    },\n    \"expectedSupplyDuration\": {\n      \"value\": 30,\n      \"unit\": \"días\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"d\"\n    }\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15e_medicationrequest_tamoxifeno.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"medReqTamoxId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"medReqTamoxId\", id);",
                  "console.log(\"medReqTamoxId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "15f · Primera dosis autoadministrada",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationAdministration",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationAdministration\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Primera dosis de tamoxifeno 20 mg VO, autoadministrada en casa, 16 de octubre de 2025.</p></div>\"\n  },\n  \"status\": \"completed\",\n  \"category\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/medication-admin-category\",\n        \"code\": \"community\",\n        \"display\": \"Community\"\n      }\n    ]\n  },\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"373345002\",\n        \"display\": \"Tamoxifen\"\n      }\n    ],\n    \"text\": \"Tamoxifeno\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2025-10-16T08:00:00-05:00\",\n  \"performer\": [\n    {\n      \"actor\": {\n        \"reference\": \"Patient/{{patientId}}\",\n        \"display\": \"Luis Alberto Paredes Cevallos\"\n      }\n    }\n  ],\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"request\": {\n    \"reference\": \"MedicationRequest/{{medReqTamoxId}}\",\n    \"display\": \"Tamoxifeno 20 mg diario\"\n  },\n  \"dosage\": {\n    \"text\": \"1 comprimido de 20 mg por vía oral\",\n    \"route\": {\n      \"coding\": [\n        {\n          \"system\": \"http://snomed.info/sct\",\n          \"code\": \"26643006\",\n          \"display\": \"Oral route\"\n        }\n      ],\n      \"text\": \"Vía oral\"\n    },\n    \"dose\": {\n      \"value\": 20,\n      \"unit\": \"mg\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"mg\"\n    }\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15f_medicationadministration_tamoxifeno.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"medAdminTamoxId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"medAdminTamoxId\", id);",
                  "console.log(\"medAdminTamoxId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "15g · Suspender el tamoxifeno (stopped)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationRequest/{{medReqTamoxId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"id\": \"{{medReqTamoxId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Tamoxifeno 20 mg por vía oral una vez al día.</p><p>Suspendido por intolerancia.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/receta\",\n      \"value\": \"RX-2025-0207\"\n    }\n  ],\n  \"status\": \"stopped\",\n  \"intent\": \"order\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/medicationrequest-category\",\n          \"code\": \"outpatient\",\n          \"display\": \"Outpatient\"\n        }\n      ]\n    }\n  ],\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"373345002\",\n        \"display\": \"Tamoxifen\"\n      }\n    ],\n    \"text\": \"Tamoxifeno\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"authoredOn\": \"2025-10-15\",\n  \"requester\": {\n    \"reference\": \"Practitioner/{{practitionerId}}\",\n    \"display\": \"Dra. Andrea Lucía Salazar Moreno\"\n  },\n  \"reasonReference\": [\n    {\n      \"reference\": \"Condition/{{conditionCancerId}}\",\n      \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n    }\n  ],\n  \"dosageInstruction\": [\n    {\n      \"text\": \"20 mg por vía oral una vez al día, durante 5 años\",\n      \"timing\": {\n        \"repeat\": {\n          \"frequency\": 1,\n          \"period\": 1,\n          \"periodUnit\": \"d\",\n          \"boundsDuration\": {\n            \"value\": 5,\n            \"unit\": \"años\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"a\"\n          }\n        }\n      },\n      \"route\": {\n        \"coding\": [\n          {\n            \"system\": \"http://snomed.info/sct\",\n            \"code\": \"26643006\",\n            \"display\": \"Oral route\"\n          }\n        ],\n        \"text\": \"Vía oral\"\n      },\n      \"doseAndRate\": [\n        {\n          \"doseQuantity\": {\n            \"value\": 20,\n            \"unit\": \"mg\",\n            \"system\": \"http://unitsofmeasure.org\",\n            \"code\": \"mg\"\n          }\n        }\n      ]\n    }\n  ],\n  \"dispenseRequest\": {\n    \"numberOfRepeatsAllowed\": 11,\n    \"quantity\": {\n      \"value\": 30,\n      \"unit\": \"comprimidos\"\n    },\n    \"expectedSupplyDuration\": {\n      \"value\": 30,\n      \"unit\": \"días\",\n      \"system\": \"http://unitsofmeasure.org\",\n      \"code\": \"d\"\n    }\n  },\n  \"statusReason\": {\n    \"text\": \"Intolerancia: sofocos intensos y dolor articular\"\n  },\n  \"note\": [\n    {\n      \"time\": \"2026-02-10T10:00:00-05:00\",\n      \"text\": \"Se suspende el tamoxifeno por intolerancia; se valorará una alternativa en oncología.\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/soluciones/15g_medicationrequest_suspender.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "15h · Error a propósito: receta sin intención (el servidor la acepta)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationRequest",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"MedicationRequest\",\n  \"status\": \"active\",\n  \"medicationCodeableConcept\": {\n    \"coding\": [\n      {\n        \"system\": \"http://snomed.info/sct\",\n        \"code\": \"373345002\",\n        \"display\": \"Tamoxifen\"\n      }\n    ]\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/15-medicamentos/errores/15e1_receta_sin_intencion.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorMedReqId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorMedReqId\", id);",
                  "console.log(\"errorMedReqId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "15i · Borrar la receta inválida",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/MedicationRequest/{{errorMedReqId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "16 · Seguimiento",
      "item": [
        {
          "name": "16a · Crear el cuestionario (Questionnaire) (creación condicional)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "If-None-Exist",
                "value": "url=https://f-slg.github.io/aprende-fhir/Questionnaire/seguimiento-oncologico"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Questionnaire",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Questionnaire\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Cuestionario de seguimiento oncológico: dolor (0 a 10), funcionalidad (ECOG),</p><p>sofocos, dolor articular y comentarios.</p></div>\"\n  },\n  \"url\": \"https://f-slg.github.io/aprende-fhir/Questionnaire/seguimiento-oncologico\",\n  \"version\": \"1.0.0\",\n  \"name\": \"SeguimientoOncologico\",\n  \"title\": \"Cuestionario de seguimiento oncológico\",\n  \"status\": \"active\",\n  \"subjectType\": [\n    \"Patient\"\n  ],\n  \"date\": \"2025-09-01\",\n  \"publisher\": \"Aprende FHIR desde cero (ejemplo didáctico)\",\n  \"description\": \"Cuestionario breve para el control de pacientes en tratamiento oncológico.\",\n  \"item\": [\n    {\n      \"linkId\": \"dolor\",\n      \"text\": \"En una escala de 0 (sin dolor) a 10 (el peor dolor imaginable), ¿cuánto dolor tuvo en la última semana?\",\n      \"type\": \"integer\",\n      \"required\": true,\n      \"code\": [\n        {\n          \"system\": \"http://loinc.org\",\n          \"code\": \"72514-3\",\n          \"display\": \"Pain severity - 0-10 verbal numeric rating [Score] - Reported\"\n        }\n      ]\n    },\n    {\n      \"linkId\": \"ecog\",\n      \"text\": \"¿Cuál de estas frases describe mejor su actividad habitual?\",\n      \"type\": \"choice\",\n      \"required\": true,\n      \"answerOption\": [\n        {\n          \"valueString\": \"0 · Hago mi vida normal sin limitaciones\"\n        },\n        {\n          \"valueString\": \"1 · Tengo síntomas, pero hago trabajos ligeros\"\n        },\n        {\n          \"valueString\": \"2 · No puedo trabajar, pero me valgo por mí mismo\"\n        },\n        {\n          \"valueString\": \"3 · Paso más de la mitad del día en cama o sentado\"\n        },\n        {\n          \"valueString\": \"4 · Estoy en cama todo el día\"\n        }\n      ]\n    },\n    {\n      \"linkId\": \"sofocos\",\n      \"text\": \"¿Ha tenido sofocos (bochornos) en la última semana?\",\n      \"type\": \"boolean\"\n    },\n    {\n      \"linkId\": \"articular\",\n      \"text\": \"¿Ha tenido dolor en las articulaciones en la última semana?\",\n      \"type\": \"boolean\"\n    },\n    {\n      \"linkId\": \"comentarios\",\n      \"text\": \"¿Algo más que quiera contarnos?\",\n      \"type\": \"text\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/16-seguimiento/soluciones/16a_questionnaire_seguimiento.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"questionnaireId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"questionnaireId\", id);",
                  "console.log(\"questionnaireId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "16b · Respuesta de octubre de 2025",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/QuestionnaireResponse",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Respuesta del 28 de octubre de 2025: dolor 2/10, ECOG 0, sin sofocos ni dolor articular.</p></div>\"\n  },\n  \"questionnaire\": \"https://f-slg.github.io/aprende-fhir/Questionnaire/seguimiento-oncologico\",\n  \"status\": \"completed\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"authored\": \"2025-10-28T09:30:00-05:00\",\n  \"author\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"source\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"item\": [\n    {\n      \"linkId\": \"dolor\",\n      \"text\": \"En una escala de 0 (sin dolor) a 10 (el peor dolor imaginable), ¿cuánto dolor tuvo en la última semana?\",\n      \"answer\": [\n        {\n          \"valueInteger\": 2\n        }\n      ]\n    },\n    {\n      \"linkId\": \"ecog\",\n      \"text\": \"¿Cuál de estas frases describe mejor su actividad habitual?\",\n      \"answer\": [\n        {\n          \"valueString\": \"0 · Hago mi vida normal sin limitaciones\"\n        }\n      ]\n    },\n    {\n      \"linkId\": \"sofocos\",\n      \"text\": \"¿Ha tenido sofocos (bochornos) en la última semana?\",\n      \"answer\": [\n        {\n          \"valueBoolean\": false\n        }\n      ]\n    },\n    {\n      \"linkId\": \"articular\",\n      \"text\": \"¿Ha tenido dolor en las articulaciones en la última semana?\",\n      \"answer\": [\n        {\n          \"valueBoolean\": false\n        }\n      ]\n    },\n    {\n      \"linkId\": \"comentarios\",\n      \"text\": \"¿Algo más que quiera contarnos?\",\n      \"answer\": [\n        {\n          \"valueString\": \"Me siento bien, ya volví al trabajo.\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/16-seguimiento/soluciones/16b_questionnaireresponse_octubre.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"responseOctoberId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"responseOctoberId\", id);",
                  "console.log(\"responseOctoberId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "16c · Respuesta de enero de 2026",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/QuestionnaireResponse",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Respuesta del 27 de enero de 2026: dolor 6/10, ECOG 1, con sofocos y dolor articular.</p></div>\"\n  },\n  \"questionnaire\": \"https://f-slg.github.io/aprende-fhir/Questionnaire/seguimiento-oncologico\",\n  \"status\": \"completed\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"authored\": \"2026-01-27T09:30:00-05:00\",\n  \"author\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"source\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"item\": [\n    {\n      \"linkId\": \"dolor\",\n      \"text\": \"En una escala de 0 (sin dolor) a 10 (el peor dolor imaginable), ¿cuánto dolor tuvo en la última semana?\",\n      \"answer\": [\n        {\n          \"valueInteger\": 6\n        }\n      ]\n    },\n    {\n      \"linkId\": \"ecog\",\n      \"text\": \"¿Cuál de estas frases describe mejor su actividad habitual?\",\n      \"answer\": [\n        {\n          \"valueString\": \"1 · Tengo síntomas, pero hago trabajos ligeros\"\n        }\n      ]\n    },\n    {\n      \"linkId\": \"sofocos\",\n      \"text\": \"¿Ha tenido sofocos (bochornos) en la última semana?\",\n      \"answer\": [\n        {\n          \"valueBoolean\": true\n        }\n      ]\n    },\n    {\n      \"linkId\": \"articular\",\n      \"text\": \"¿Ha tenido dolor en las articulaciones en la última semana?\",\n      \"answer\": [\n        {\n          \"valueBoolean\": true\n        }\n      ]\n    },\n    {\n      \"linkId\": \"comentarios\",\n      \"text\": \"¿Algo más que quiera contarnos?\",\n      \"answer\": [\n        {\n          \"valueString\": \"Los bochornos no me dejan dormir y me duelen las rodillas y las manos.\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/16-seguimiento/soluciones/16c_questionnaireresponse_enero.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"responseJanuaryId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"responseJanuaryId\", id);",
                  "console.log(\"responseJanuaryId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "16d · Dolor 6/10 como observación (derivedFrom)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dolor 6/10 (escala numérica), informado por el paciente el 27 de enero de 2026.</p></div>\"\n  },\n  \"status\": \"final\",\n  \"category\": [\n    {\n      \"coding\": [\n        {\n          \"system\": \"http://terminology.hl7.org/CodeSystem/observation-category\",\n          \"code\": \"survey\",\n          \"display\": \"Survey\"\n        }\n      ]\n    }\n  ],\n  \"code\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"72514-3\",\n        \"display\": \"Pain severity - 0-10 verbal numeric rating [Score] - Reported\"\n      }\n    ],\n    \"text\": \"Intensidad del dolor (0 a 10)\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"effectiveDateTime\": \"2026-01-27T09:30:00-05:00\",\n  \"performer\": [\n    {\n      \"reference\": \"Patient/{{patientId}}\",\n      \"display\": \"Luis Alberto Paredes Cevallos\"\n    }\n  ],\n  \"valueInteger\": 6,\n  \"derivedFrom\": [\n    {\n      \"reference\": \"QuestionnaireResponse/{{responseJanuaryId}}\",\n      \"display\": \"Cuestionario del 27 de enero de 2026\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/16-seguimiento/soluciones/16d_observation_dolor.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "16e · Respuestas del paciente a este cuestionario",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/QuestionnaireResponse?subject=Patient/{{patientId}}&questionnaire=https://f-slg.github.io/aprende-fhir/Questionnaire/seguimiento-oncologico&_sort=authored"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "16f · Error a propósito: una respuesta numérica escrita en letras",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/QuestionnaireResponse",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"QuestionnaireResponse\",\n  \"questionnaire\": \"https://f-slg.github.io/aprende-fhir/Questionnaire/seguimiento-oncologico\",\n  \"status\": \"completed\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"item\": [\n    {\n      \"linkId\": \"dolor\",\n      \"answer\": [\n        {\n          \"valueInteger\": \"seis\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/16-seguimiento/errores/16e1_respuesta_con_texto.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "17 · Búsquedas avanzadas y versiones",
      "item": [
        {
          "name": "17a · Encadenada: signos vitales por la cédula del paciente",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject.identifier=https://f-slg.github.io/aprende-fhir/sid/cedula|9900000017&category=vital-signs"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17b · Encadenada con tipo: encuentros de los pacientes Paredes Luis",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Encounter?subject:Patient.family=Paredes&subject:Patient.given=Luis"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17c · Inversa (_has): pacientes con cáncer de mama",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Patient?_has:Condition:subject:code=http://snomed.info/sct|254837009"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17d · Prefijo gt: frecuencia cardíaca mayor que 100",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&code=http://loinc.org|8867-4&value-quantity=gt100"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17e · Rango de fechas: encuentros de abril de 2025",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Encounter?subject=Patient/{{patientId}}&date=ge2025-04-01&date=lt2025-05-01"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17f · Modificador :exact",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Patient?family:exact=Paredes%20Cevallos"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17g · Modificador :not: condiciones no resueltas",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Condition?subject=Patient/{{patientId}}&clinical-status:not=resolved"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17h · Modificador :missing: observaciones sin encuentro",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&encounter:missing=true"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17i · Solo contar: _summary=count",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&_summary=count"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17j · Solo algunos elementos: _elements",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&category=vital-signs&_elements=code,value"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17k · La medición más reciente: _sort y _count",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&code=http://loinc.org|8867-4&_sort=-date&_count=1"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17l · Paginación: 5 resultados por página",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Observation?subject=Patient/{{patientId}}&_count=5"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17m · Leer una versión anterior (vread)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}/_history/1"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17n · Qué cambió entre versiones ($diff)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Cache-Control",
                "value": "no-cache"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}/$diff"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17o · Actualizar con If-Match (versión 2)",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "If-Match",
                "value": "W/\"2\""
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"id\": \"{{patientId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p><p>Teléfono +593 99 000 0000 · luis.paredes@correo.invalid · Casado.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"NI\",\n            \"display\": \"National unique individual identifier\"\n          }\n        ],\n        \"text\": \"Cédula de identidad\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n      \"value\": \"9900000017\"\n    },\n    {\n      \"use\": \"usual\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"MR\",\n            \"display\": \"Medical record number\"\n          }\n        ],\n        \"text\": \"Historia clínica\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n      \"value\": \"HC-000123\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Luis Alberto Paredes Cevallos\",\n      \"family\": \"Paredes Cevallos\",\n      \"_family\": {\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n            \"valueString\": \"Paredes\"\n          },\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n            \"valueString\": \"Cevallos\"\n          }\n        ]\n      },\n      \"given\": [\n        \"Luis\",\n        \"Alberto\"\n      ]\n    },\n    {\n      \"use\": \"usual\",\n      \"text\": \"Luis Paredes\"\n    }\n  ],\n  \"gender\": \"male\",\n  \"birthDate\": \"1979-03-12\",\n  \"address\": [\n    {\n      \"use\": \"home\",\n      \"type\": \"physical\",\n      \"line\": [\n        \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n      ],\n      \"city\": \"Quito\",\n      \"district\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ],\n  \"communication\": [\n    {\n      \"language\": {\n        \"coding\": [\n          {\n            \"system\": \"urn:ietf:bcp:47\",\n            \"code\": \"es\",\n            \"display\": \"Spanish\"\n          }\n        ],\n        \"text\": \"Español\"\n      },\n      \"preferred\": true\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n      \"valueAddress\": {\n        \"city\": \"Riobamba\",\n        \"state\": \"Chimborazo\",\n        \"country\": \"EC\"\n      }\n    }\n  ],\n  \"telecom\": [\n    {\n      \"system\": \"phone\",\n      \"value\": \"+593 99 000 0000\",\n      \"use\": \"mobile\"\n    },\n    {\n      \"system\": \"email\",\n      \"value\": \"luis.paredes@correo.invalid\",\n      \"use\": \"home\"\n    }\n  ],\n  \"maritalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\",\n        \"code\": \"M\",\n        \"display\": \"Married\"\n      }\n    ],\n    \"text\": \"Casado\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/17-busquedas-y-versiones/soluciones/17a_patient_agregar_correo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "17p · Error a propósito: actualizar con una versión vieja",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "If-Match",
                "value": "W/\"2\""
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"id\": \"{{patientId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p><p>Teléfono +593 99 000 0000 · luis.paredes@correo.invalid · Casado.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"NI\",\n            \"display\": \"National unique individual identifier\"\n          }\n        ],\n        \"text\": \"Cédula de identidad\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n      \"value\": \"9900000017\"\n    },\n    {\n      \"use\": \"usual\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"MR\",\n            \"display\": \"Medical record number\"\n          }\n        ],\n        \"text\": \"Historia clínica\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n      \"value\": \"HC-000123\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Luis Alberto Paredes Cevallos\",\n      \"family\": \"Paredes Cevallos\",\n      \"_family\": {\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n            \"valueString\": \"Paredes\"\n          },\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n            \"valueString\": \"Cevallos\"\n          }\n        ]\n      },\n      \"given\": [\n        \"Luis\",\n        \"Alberto\"\n      ]\n    },\n    {\n      \"use\": \"usual\",\n      \"text\": \"Luis Paredes\"\n    }\n  ],\n  \"gender\": \"male\",\n  \"birthDate\": \"1979-03-12\",\n  \"address\": [\n    {\n      \"use\": \"home\",\n      \"type\": \"physical\",\n      \"line\": [\n        \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n      ],\n      \"city\": \"Quito\",\n      \"district\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ],\n  \"communication\": [\n    {\n      \"language\": {\n        \"coding\": [\n          {\n            \"system\": \"urn:ietf:bcp:47\",\n            \"code\": \"es\",\n            \"display\": \"Spanish\"\n          }\n        ],\n        \"text\": \"Español\"\n      },\n      \"preferred\": true\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n      \"valueAddress\": {\n        \"city\": \"Riobamba\",\n        \"state\": \"Chimborazo\",\n        \"country\": \"EC\"\n      }\n    }\n  ],\n  \"telecom\": [\n    {\n      \"system\": \"phone\",\n      \"value\": \"+593 99 000 0000\",\n      \"use\": \"mobile\"\n    },\n    {\n      \"system\": \"email\",\n      \"value\": \"luis.paredes@correo.invalid\",\n      \"use\": \"home\"\n    }\n  ],\n  \"maritalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\",\n        \"code\": \"M\",\n        \"display\": \"Married\"\n      }\n    ],\n    \"text\": \"Casado\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/17-busquedas-y-versiones/soluciones/17a_patient_agregar_correo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"El servidor rechaza el error (4xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(400, 499);",
                  "});",
                  "console.log(pm.response.json().issue[0].diagnostics);"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "18 · Terminologías y perfiles",
      "item": [
        {
          "name": "18a · Guardar el perfil del taller (StructureDefinition) (creación condicional)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "If-None-Exist",
                "value": "url=https://f-slg.github.io/aprende-fhir/StructureDefinition/paciente-taller"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/StructureDefinition",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"StructureDefinition\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Perfil didáctico PacienteTaller: un Patient que debe tener al menos un identificador,</p><p>un nombre, el sexo y la fecha de nacimiento.</p></div>\"\n  },\n  \"url\": \"https://f-slg.github.io/aprende-fhir/StructureDefinition/paciente-taller\",\n  \"version\": \"1.0.0\",\n  \"name\": \"PacienteTaller\",\n  \"title\": \"Paciente del taller\",\n  \"status\": \"draft\",\n  \"date\": \"2026-10-18\",\n  \"publisher\": \"Aprende FHIR desde cero (ejemplo didáctico)\",\n  \"description\": \"Perfil didáctico de Patient: exige identificador, nombre, sexo y fecha de nacimiento.\",\n  \"fhirVersion\": \"4.0.1\",\n  \"kind\": \"resource\",\n  \"abstract\": false,\n  \"type\": \"Patient\",\n  \"baseDefinition\": \"http://hl7.org/fhir/StructureDefinition/Patient\",\n  \"derivation\": \"constraint\",\n  \"differential\": {\n    \"element\": [\n      {\n        \"id\": \"Patient\",\n        \"path\": \"Patient\",\n        \"short\": \"Paciente del taller\"\n      },\n      {\n        \"id\": \"Patient.identifier\",\n        \"path\": \"Patient.identifier\",\n        \"short\": \"Al menos un identificador (la cédula)\",\n        \"min\": 1\n      },\n      {\n        \"id\": \"Patient.name\",\n        \"path\": \"Patient.name\",\n        \"short\": \"Al menos un nombre\",\n        \"min\": 1\n      },\n      {\n        \"id\": \"Patient.gender\",\n        \"path\": \"Patient.gender\",\n        \"short\": \"Sexo administrativo obligatorio\",\n        \"min\": 1\n      },\n      {\n        \"id\": \"Patient.birthDate\",\n        \"path\": \"Patient.birthDate\",\n        \"short\": \"Fecha de nacimiento obligatoria\",\n        \"min\": 1\n      }\n    ]\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/18-terminologias-y-perfiles/soluciones/18a_structuredefinition_paciente_taller.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"profileId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"profileId\", id);",
                  "console.log(\"profileId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "18b · Validar a Luis contra el perfil ($validate)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/$validate?profile=https://f-slg.github.io/aprende-fhir/StructureDefinition/paciente-taller",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"id\": \"{{patientId}}\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p><p>Teléfono +593 99 000 0000 · Casado.</p></div>\"\n  },\n  \"identifier\": [\n    {\n      \"use\": \"official\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"NI\",\n            \"display\": \"National unique individual identifier\"\n          }\n        ],\n        \"text\": \"Cédula de identidad\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n      \"value\": \"9900000017\"\n    },\n    {\n      \"use\": \"usual\",\n      \"type\": {\n        \"coding\": [\n          {\n            \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n            \"code\": \"MR\",\n            \"display\": \"Medical record number\"\n          }\n        ],\n        \"text\": \"Historia clínica\"\n      },\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n      \"value\": \"HC-000123\"\n    }\n  ],\n  \"active\": true,\n  \"name\": [\n    {\n      \"use\": \"official\",\n      \"text\": \"Luis Alberto Paredes Cevallos\",\n      \"family\": \"Paredes Cevallos\",\n      \"_family\": {\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n            \"valueString\": \"Paredes\"\n          },\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n            \"valueString\": \"Cevallos\"\n          }\n        ]\n      },\n      \"given\": [\n        \"Luis\",\n        \"Alberto\"\n      ]\n    },\n    {\n      \"use\": \"usual\",\n      \"text\": \"Luis Paredes\"\n    }\n  ],\n  \"gender\": \"male\",\n  \"birthDate\": \"1979-03-12\",\n  \"address\": [\n    {\n      \"use\": \"home\",\n      \"type\": \"physical\",\n      \"line\": [\n        \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n      ],\n      \"city\": \"Quito\",\n      \"district\": \"Quito\",\n      \"state\": \"Pichincha\",\n      \"country\": \"EC\"\n    }\n  ],\n  \"communication\": [\n    {\n      \"language\": {\n        \"coding\": [\n          {\n            \"system\": \"urn:ietf:bcp:47\",\n            \"code\": \"es\",\n            \"display\": \"Spanish\"\n          }\n        ],\n        \"text\": \"Español\"\n      },\n      \"preferred\": true\n    }\n  ],\n  \"extension\": [\n    {\n      \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n      \"valueAddress\": {\n        \"city\": \"Riobamba\",\n        \"state\": \"Chimborazo\",\n        \"country\": \"EC\"\n      }\n    }\n  ],\n  \"telecom\": [\n    {\n      \"system\": \"phone\",\n      \"value\": \"+593 99 000 0000\",\n      \"use\": \"mobile\"\n    }\n  ],\n  \"maritalStatus\": {\n    \"coding\": [\n      {\n        \"system\": \"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\",\n        \"code\": \"M\",\n        \"display\": \"Married\"\n      }\n    ],\n    \"text\": \"Casado\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/02-patient/soluciones/02e_patient_actualizar.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18c · Error a propósito: validar un paciente sin fecha de nacimiento",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/$validate?profile=https://f-slg.github.io/aprende-fhir/StructureDefinition/paciente-taller",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Patient\",\n  \"identifier\": [\n    {\n      \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n      \"value\": \"9800000012\"\n    }\n  ],\n  \"name\": [\n    {\n      \"text\": \"Paciente de prueba sin fecha de nacimiento\"\n    }\n  ],\n  \"gender\": \"male\"\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/18-terminologias-y-perfiles/errores/18e1_paciente_sin_fecha.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18d · El servidor también valida sin perfil",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Observation/$validate",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Observation\",\n  \"status\": \"final\",\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\"\n  },\n  \"valueQuantity\": {\n    \"value\": 38.4,\n    \"unit\": \"°C\",\n    \"system\": \"http://unitsofmeasure.org\",\n    \"code\": \"Cel\"\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/06-observaciones/errores/06e2_observacion_sin_codigo.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18e · Crear el sistema de códigos ECOG (CodeSystem) (creación condicional)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "If-None-Exist",
                "value": "url=https://f-slg.github.io/aprende-fhir/CodeSystem/ecog"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/CodeSystem",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"CodeSystem\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Escala de funcionalidad ECOG (versión didáctica): 0 a 4.</p></div>\"\n  },\n  \"url\": \"https://f-slg.github.io/aprende-fhir/CodeSystem/ecog\",\n  \"version\": \"1.0.0\",\n  \"name\": \"EscalaECOG\",\n  \"title\": \"Escala de funcionalidad ECOG (versión didáctica)\",\n  \"status\": \"active\",\n  \"date\": \"2026-10-18\",\n  \"publisher\": \"Aprende FHIR desde cero (ejemplo didáctico)\",\n  \"description\": \"Códigos de la escala de funcionalidad ECOG, con descripciones en español.\",\n  \"caseSensitive\": true,\n  \"content\": \"complete\",\n  \"count\": 5,\n  \"concept\": [\n    {\n      \"code\": \"0\",\n      \"display\": \"Actividad normal sin limitaciones\"\n    },\n    {\n      \"code\": \"1\",\n      \"display\": \"Síntomas, pero ambulatorio y capaz de trabajos ligeros\"\n    },\n    {\n      \"code\": \"2\",\n      \"display\": \"Ambulatorio y capaz de cuidarse, pero no de trabajar\"\n    },\n    {\n      \"code\": \"3\",\n      \"display\": \"En cama o sentado más de la mitad del día\"\n    },\n    {\n      \"code\": \"4\",\n      \"display\": \"Completamente incapacitado, en cama\"\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/18-terminologias-y-perfiles/soluciones/18b_codesystem_ecog.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"codeSystemId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"codeSystemId\", id);",
                  "console.log(\"codeSystemId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "18f · Crear el conjunto de valores ECOG (ValueSet) (creación condicional)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "If-None-Exist",
                "value": "url=https://f-slg.github.io/aprende-fhir/ValueSet/ecog"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ValueSet",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"ValueSet\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Valores de la escala ECOG: todos los códigos del CodeSystem EscalaECOG.</p></div>\"\n  },\n  \"url\": \"https://f-slg.github.io/aprende-fhir/ValueSet/ecog\",\n  \"version\": \"1.0.0\",\n  \"name\": \"ValoresECOG\",\n  \"title\": \"Valores de la escala ECOG\",\n  \"status\": \"active\",\n  \"date\": \"2026-10-18\",\n  \"publisher\": \"Aprende FHIR desde cero (ejemplo didáctico)\",\n  \"description\": \"Conjunto de valores con todos los códigos de la escala ECOG del taller.\",\n  \"compose\": {\n    \"include\": [\n      {\n        \"system\": \"https://f-slg.github.io/aprende-fhir/CodeSystem/ecog\"\n      }\n    ]\n  }\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/18-terminologias-y-perfiles/soluciones/18c_valueset_ecog.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"valueSetId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"valueSetId\", id);",
                  "console.log(\"valueSetId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "18g · $lookup: qué significa el código 1",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/CodeSystem/$lookup?system=https://f-slg.github.io/aprende-fhir/CodeSystem/ecog&code=1"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18h · $validate-code: el código 1 está en el conjunto",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ValueSet/$validate-code?url=https://f-slg.github.io/aprende-fhir/ValueSet/ecog&system=https://f-slg.github.io/aprende-fhir/CodeSystem/ecog&code=1"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18i · $validate-code: el código 9 no existe",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/ValueSet/$validate-code?url=https://f-slg.github.io/aprende-fhir/ValueSet/ecog&system=https://f-slg.github.io/aprende-fhir/CodeSystem/ecog&code=9"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18j · Servidor de terminología: $lookup de un código LOINC",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{TXURL}}/CodeSystem/$lookup?system=http://loinc.org&code=8310-5"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18k · Servidor de terminología: $lookup de un código SNOMED CT",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{TXURL}}/CodeSystem/$lookup?system=http://snomed.info/sct&code=254837009"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18l · Servidor de terminología: $subsumes (jerarquía de SNOMED CT)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{TXURL}}/CodeSystem/$subsumes?system=http://snomed.info/sct&codeA=363346000&codeB=254837009"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18m · Servidor de terminología: $validate-code de 'masculino'",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{TXURL}}/ValueSet/$validate-code?url=http://hl7.org/fhir/ValueSet/administrative-gender&system=http://hl7.org/fhir/administrative-gender&code=masculino"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "18n · Servidor de terminología: $expand de la criticidad de alergias",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{TXURL}}/ValueSet/$expand?url=http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "19 · Resumen del paciente (IPS)",
      "item": [
        {
          "name": "19a · Composition del resumen del paciente (IPS)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Composition",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Composition\",\n  \"text\": {\n    \"status\": \"generated\",\n    \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Resumen internacional del paciente (IPS) de Luis Alberto Paredes Cevallos,</p><p>emitido el 15 de febrero de 2026 por el servicio de Oncología Clínica.</p></div>\"\n  },\n  \"identifier\": {\n    \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n    \"value\": \"IPS-2026-0001\"\n  },\n  \"status\": \"final\",\n  \"type\": {\n    \"coding\": [\n      {\n        \"system\": \"http://loinc.org\",\n        \"code\": \"60591-5\",\n        \"display\": \"Patient summary Document\"\n      }\n    ],\n    \"text\": \"Resumen del paciente\"\n  },\n  \"subject\": {\n    \"reference\": \"Patient/{{patientId}}\",\n    \"display\": \"Luis Alberto Paredes Cevallos\"\n  },\n  \"date\": \"2026-02-15T10:00:00-05:00\",\n  \"author\": [\n    {\n      \"reference\": \"PractitionerRole/{{oncologistRoleId}}\",\n      \"display\": \"Dr. Ruiz · Oncología clínica\"\n    }\n  ],\n  \"title\": \"Resumen internacional del paciente\",\n  \"confidentiality\": \"N\",\n  \"custodian\": {\n    \"reference\": \"Organization/{{hospitalId}}\",\n    \"display\": \"Hospital General Docente Ejemplo\"\n  },\n  \"section\": [\n    {\n      \"title\": \"Problemas activos\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"11450-4\",\n            \"display\": \"Problem list - Reported\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carcinoma ductal infiltrante de mama izquierda (activo, desde mayo de 2025).</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"Condition/{{conditionCancerId}}\",\n          \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Alergias e intolerancias\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"48765-2\",\n            \"display\": \"Allergies and adverse reactions Document\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Alergia a la penicilina, criticidad alta: urticaria generalizada.</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"AllergyIntolerance/{{allergyId}}\",\n          \"display\": \"Alergia a la penicilina\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Medicación\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"10160-0\",\n            \"display\": \"History of Medication use Narrative\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Losartán 50 mg por vía oral una vez al día (hipertensión arterial).</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"MedicationStatement/{{medStatementId}}\",\n          \"display\": \"Losartán 50 mg diarios\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Vacunas\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"11369-6\",\n            \"display\": \"History of Immunization note\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Influenza estacional (3 de abril de 2025).</p><p>Td, refuerzo (3 de abril de 2025).</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"Immunization/{{fluImmunizationId}}\",\n          \"display\": \"Influenza, 3 de abril de 2025\"\n        },\n        {\n          \"reference\": \"Immunization/{{tdImmunizationId}}\",\n          \"display\": \"Td, 3 de abril de 2025\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Procedimientos\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"47519-4\",\n            \"display\": \"History of Procedures Document\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda (10 de junio de 2025), exitosa.</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"Procedure/{{procedureId}}\",\n          \"display\": \"Mastectomía parcial\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Resultados\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"30954-2\",\n            \"display\": \"Relevant diagnostic tests/laboratory data note\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Anatomía patológica: carcinoma ductal infiltrante de 3,5 cm, receptor de estrógeno positivo (Allred 8).</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"DiagnosticReport/{{diagnosticReportId}}\",\n          \"display\": \"Informe de patología\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Plan de tratamiento\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"18776-5\",\n            \"display\": \"Plan of care note\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Plan del comité de tumores: cirugía, quimioterapia (4 ciclos) y hormonoterapia;</p><p>tamoxifeno suspendido en febrero de 2026 por intolerancia.</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"CarePlan/{{carePlanId}}\",\n          \"display\": \"Plan de tratamiento del cáncer de mama\"\n        }\n      ]\n    },\n    {\n      \"title\": \"Antecedentes\",\n      \"code\": {\n        \"coding\": [\n          {\n            \"system\": \"http://loinc.org\",\n            \"code\": \"11348-0\",\n            \"display\": \"History of Past illness note\"\n          }\n        ]\n      },\n      \"text\": {\n        \"status\": \"generated\",\n        \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Intoxicación alimentaria bacteriana (marzo de 2025), resuelta.</p></div>\"\n      },\n      \"entry\": [\n        {\n          \"reference\": \"Condition/{{conditionIntoxId}}\",\n          \"display\": \"Intoxicación alimentaria\"\n        }\n      ]\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/19-resumen-ips/soluciones/19a_composition_ips.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"compositionIpsId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"compositionIpsId\", id);",
                  "console.log(\"compositionIpsId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "19b · El servidor arma el documento ($document)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Composition/{{compositionIpsId}}/$document"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "19c · Guardar el IPS autocontenido",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Bundle",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Bundle\",\n  \"identifier\": {\n    \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n    \"value\": \"IPS-2026-0002\"\n  },\n  \"type\": \"document\",\n  \"timestamp\": \"2026-02-15T10:05:00-05:00\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:71f58005-a7dd-50ea-b9a2-c9b70638ce0b\",\n      \"resource\": {\n        \"resourceType\": \"Composition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Resumen internacional del paciente (IPS) de Luis Alberto Paredes Cevallos,</p><p>emitido el 15 de febrero de 2026 por el servicio de Oncología Clínica.</p></div>\"\n        },\n        \"identifier\": {\n          \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n          \"value\": \"IPS-2026-0002\"\n        },\n        \"status\": \"final\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"60591-5\",\n              \"display\": \"Patient summary Document\"\n            }\n          ],\n          \"text\": \"Resumen del paciente\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"date\": \"2026-02-15T10:00:00-05:00\",\n        \"author\": [\n          {\n            \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n            \"display\": \"Dr. Ruiz · Oncología clínica\"\n          }\n        ],\n        \"title\": \"Resumen internacional del paciente\",\n        \"confidentiality\": \"N\",\n        \"custodian\": {\n          \"reference\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n          \"display\": \"Hospital General Docente Ejemplo\"\n        },\n        \"section\": [\n          {\n            \"title\": \"Problemas activos\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"11450-4\",\n                  \"display\": \"Problem list - Reported\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carcinoma ductal infiltrante de mama izquierda (activo, desde mayo de 2025).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n                \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Alergias e intolerancias\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"48765-2\",\n                  \"display\": \"Allergies and adverse reactions Document\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Alergia a la penicilina, criticidad alta: urticaria generalizada.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:984c1250-8e4f-5638-8bff-fe5cb3396929\",\n                \"display\": \"Alergia a la penicilina\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Medicación\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"10160-0\",\n                  \"display\": \"History of Medication use Narrative\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Losartán 50 mg por vía oral una vez al día (hipertensión arterial).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:1c8d9299-5780-580f-8c4f-338a8adaf567\",\n                \"display\": \"Losartán 50 mg diarios\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Vacunas\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"11369-6\",\n                  \"display\": \"History of Immunization note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Influenza estacional (3 de abril de 2025).</p><p>Td, refuerzo (3 de abril de 2025).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:1c23a482-34bb-5dc6-b674-31cd0c22e699\",\n                \"display\": \"Influenza, 3 de abril de 2025\"\n              },\n              {\n                \"reference\": \"urn:uuid:7a34d1ce-2f4f-5266-bcba-2bfbbc582b04\",\n                \"display\": \"Td, 3 de abril de 2025\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Procedimientos\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"47519-4\",\n                  \"display\": \"History of Procedures Document\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda (10 de junio de 2025), exitosa.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:6d3eb46f-ac7b-58bc-9045-ff178b9f174a\",\n                \"display\": \"Mastectomía parcial\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Resultados\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"30954-2\",\n                  \"display\": \"Relevant diagnostic tests/laboratory data note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Anatomía patológica: carcinoma ductal infiltrante de 3,5 cm, receptor de estrógeno positivo (Allred 8).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:700c2dc9-fcb4-56fe-b789-6b32667f9cd3\",\n                \"display\": \"Informe de patología\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Plan de tratamiento\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"18776-5\",\n                  \"display\": \"Plan of care note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Plan del comité de tumores: cirugía, quimioterapia (4 ciclos) y hormonoterapia;</p><p>tamoxifeno suspendido en febrero de 2026 por intolerancia.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:c193b719-cfb2-5785-8823-e945606fdc45\",\n                \"display\": \"Plan de tratamiento del cáncer de mama\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Antecedentes\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"11348-0\",\n                  \"display\": \"History of Past illness note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Intoxicación alimentaria bacteriana (marzo de 2025), resuelta.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:6fcc22a2-86d1-5ef6-a254-6f6770b5ef60\",\n                \"display\": \"Intoxicación alimentaria\"\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p><p>Teléfono +593 99 000 0000 · Casado.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"NI\",\n                  \"display\": \"National unique individual identifier\"\n                }\n              ],\n              \"text\": \"Cédula de identidad\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n            \"value\": \"9900000017\"\n          },\n          {\n            \"use\": \"usual\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"MR\",\n                  \"display\": \"Medical record number\"\n                }\n              ],\n              \"text\": \"Historia clínica\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n            \"value\": \"HC-000123\"\n          }\n        ],\n        \"active\": true,\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Luis Alberto Paredes Cevallos\",\n            \"family\": \"Paredes Cevallos\",\n            \"_family\": {\n              \"extension\": [\n                {\n                  \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n                  \"valueString\": \"Paredes\"\n                },\n                {\n                  \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n                  \"valueString\": \"Cevallos\"\n                }\n              ]\n            },\n            \"given\": [\n              \"Luis\",\n              \"Alberto\"\n            ]\n          },\n          {\n            \"use\": \"usual\",\n            \"text\": \"Luis Paredes\"\n          }\n        ],\n        \"gender\": \"male\",\n        \"birthDate\": \"1979-03-12\",\n        \"address\": [\n          {\n            \"use\": \"home\",\n            \"type\": \"physical\",\n            \"line\": [\n              \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n            ],\n            \"city\": \"Quito\",\n            \"district\": \"Quito\",\n            \"state\": \"Pichincha\",\n            \"country\": \"EC\"\n          }\n        ],\n        \"communication\": [\n          {\n            \"language\": {\n              \"coding\": [\n                {\n                  \"system\": \"urn:ietf:bcp:47\",\n                  \"code\": \"es\",\n                  \"display\": \"Spanish\"\n                }\n              ],\n              \"text\": \"Español\"\n            },\n            \"preferred\": true\n          }\n        ],\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n            \"valueAddress\": {\n              \"city\": \"Riobamba\",\n              \"state\": \"Chimborazo\",\n              \"country\": \"EC\"\n            }\n          }\n        ],\n        \"telecom\": [\n          {\n            \"system\": \"phone\",\n            \"value\": \"+593 99 000 0000\",\n            \"use\": \"mobile\"\n          }\n        ],\n        \"maritalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\",\n              \"code\": \"M\",\n              \"display\": \"Married\"\n            }\n          ],\n          \"text\": \"Casado\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:a36b7bd8-06d2-5884-a3de-a13c48d07d5e\",\n      \"resource\": {\n        \"resourceType\": \"Practitioner\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dr. Esteban Patricio Ruiz Montalvo, oncólogo clínico. Registro profesional ficticio RP-000733.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/registro-profesional\",\n            \"value\": \"RP-000733\"\n          }\n        ],\n        \"active\": true,\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Dr. Esteban Patricio Ruiz Montalvo\",\n            \"prefix\": [\n              \"Dr.\"\n            ],\n            \"family\": \"Ruiz Montalvo\",\n            \"given\": [\n              \"Esteban\",\n              \"Patricio\"\n            ]\n          }\n        ],\n        \"gender\": \"male\",\n        \"qualification\": [\n          {\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0360\",\n                  \"code\": \"MD\",\n                  \"display\": \"Doctor of Medicine\"\n                }\n              ],\n              \"text\": \"Médico\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n      \"resource\": {\n        \"resourceType\": \"PractitionerRole\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dr. Esteban Patricio Ruiz Montalvo: oncólogo clínico en el Hospital General Docente Ejemplo.</p></div>\"\n        },\n        \"active\": true,\n        \"practitioner\": {\n          \"reference\": \"urn:uuid:a36b7bd8-06d2-5884-a3de-a13c48d07d5e\",\n          \"display\": \"Dr. Esteban Patricio Ruiz Montalvo\"\n        },\n        \"organization\": {\n          \"reference\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n          \"display\": \"Hospital General Docente Ejemplo\"\n        },\n        \"code\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/practitioner-role\",\n                \"code\": \"doctor\",\n                \"display\": \"Doctor\"\n              }\n            ],\n            \"text\": \"Médico\"\n          }\n        ],\n        \"specialty\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"394593009\",\n                \"display\": \"Medical oncology\"\n              }\n            ],\n            \"text\": \"Oncología clínica\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n      \"resource\": {\n        \"resourceType\": \"Organization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Hospital General Docente Ejemplo, parte de la Red de Servicios de Salud Ejemplo (ficticia).</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/establecimiento\",\n            \"value\": \"HGDE-0001\"\n          }\n        ],\n        \"active\": true,\n        \"type\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/organization-type\",\n                \"code\": \"prov\",\n                \"display\": \"Healthcare Provider\"\n              }\n            ]\n          }\n        ],\n        \"name\": \"Hospital General Docente Ejemplo\",\n        \"telecom\": [\n          {\n            \"system\": \"phone\",\n            \"value\": \"+593 2 000 0000\",\n            \"use\": \"work\"\n          }\n        ],\n        \"address\": [\n          {\n            \"line\": [\n              \"Av. Principal Ejemplo S00-00\"\n            ],\n            \"city\": \"Quito\",\n            \"state\": \"Pichincha\",\n            \"country\": \"EC\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carcinoma ductal infiltrante de mama izquierda (activo, confirmado).</p><p>Diagnóstico: 13 de mayo de 2025.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/condicion\",\n            \"value\": \"COND-2025-0002\"\n          }\n        ],\n        \"clinicalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n              \"code\": \"active\",\n              \"display\": \"Active\"\n            }\n          ]\n        },\n        \"verificationStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\n              \"code\": \"confirmed\",\n              \"display\": \"Confirmed\"\n            }\n          ]\n        },\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n                \"code\": \"problem-list-item\",\n                \"display\": \"Problem List Item\"\n              }\n            ]\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/icd-10\",\n              \"code\": \"C50.9\",\n              \"display\": \"Breast, unspecified\"\n            },\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"254837009\",\n              \"display\": \"Malignant neoplasm of breast\"\n            }\n          ],\n          \"text\": \"Carcinoma ductal infiltrante de mama izquierda\"\n        },\n        \"bodySite\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"80248007\",\n                \"display\": \"Left breast structure\"\n              }\n            ],\n            \"text\": \"Mama izquierda\"\n          }\n        ],\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"onsetDateTime\": \"2025-05-13\",\n        \"recordedDate\": \"2025-05-13\",\n        \"evidence\": [\n          {\n            \"detail\": [\n              {\n                \"reference\": \"urn:uuid:700c2dc9-fcb4-56fe-b789-6b32667f9cd3\",\n                \"display\": \"Informe de patología AP-2025-0457\"\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:984c1250-8e4f-5638-8bff-fe5cb3396929\",\n      \"resource\": {\n        \"resourceType\": \"AllergyIntolerance\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Alergia a la penicilina (criticidad alta): urticaria generalizada en la adolescencia.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/alergia\",\n            \"value\": \"AL-2025-0001\"\n          }\n        ],\n        \"clinicalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical\",\n              \"code\": \"active\",\n              \"display\": \"Active\"\n            }\n          ]\n        },\n        \"verificationStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification\",\n              \"code\": \"confirmed\",\n              \"display\": \"Confirmed\"\n            }\n          ]\n        },\n        \"type\": \"allergy\",\n        \"category\": [\n          \"medication\"\n        ],\n        \"criticality\": \"high\",\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"764146007\",\n              \"display\": \"Penicillin\"\n            }\n          ],\n          \"text\": \"Penicilina\"\n        },\n        \"patient\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"onsetString\": \"En la adolescencia\",\n        \"recordedDate\": \"2025-03-20\",\n        \"asserter\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"reaction\": [\n          {\n            \"substance\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://snomed.info/sct\",\n                  \"code\": \"764146007\",\n                  \"display\": \"Penicillin\"\n                }\n              ],\n              \"text\": \"Penicilina\"\n            },\n            \"manifestation\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"126485001\",\n                    \"display\": \"Urticaria\"\n                  }\n                ],\n                \"text\": \"Urticaria generalizada\"\n              }\n            ],\n            \"severity\": \"moderate\",\n            \"description\": \"Ronchas en todo el cuerpo a las pocas horas de una inyección de penicilina.\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:1c8d9299-5780-580f-8c4f-338a8adaf567\",\n      \"resource\": {\n        \"resourceType\": \"MedicationStatement\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Toma losartán 50 mg por vía oral una vez al día para la hipertensión, desde 2021.</p></div>\"\n        },\n        \"status\": \"active\",\n        \"medicationCodeableConcept\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"373567002\",\n              \"display\": \"Losartan\"\n            }\n          ],\n          \"text\": \"Losartán\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectivePeriod\": {\n          \"start\": \"2021-06\"\n        },\n        \"dateAsserted\": \"2025-03-20\",\n        \"informationSource\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"reasonCode\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"38341003\",\n                \"display\": \"Hypertensive disorder, systemic arterial\"\n              }\n            ],\n            \"text\": \"Hipertensión arterial\"\n          }\n        ],\n        \"dosage\": [\n          {\n            \"text\": \"50 mg por vía oral una vez al día\",\n            \"timing\": {\n              \"repeat\": {\n                \"frequency\": 1,\n                \"period\": 1,\n                \"periodUnit\": \"d\"\n              }\n            },\n            \"route\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://snomed.info/sct\",\n                  \"code\": \"26643006\",\n                  \"display\": \"Oral route\"\n                }\n              ],\n              \"text\": \"Vía oral\"\n            },\n            \"doseAndRate\": [\n              {\n                \"doseQuantity\": {\n                  \"value\": 50,\n                  \"unit\": \"mg\",\n                  \"system\": \"http://unitsofmeasure.org\",\n                  \"code\": \"mg\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:1c23a482-34bb-5dc6-b674-31cd0c22e699\",\n      \"resource\": {\n        \"resourceType\": \"Immunization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Vacuna contra la influenza estacional, 0,5 mL IM en el brazo izquierdo, lote FLU-25-0417.</p></div>\"\n        },\n        \"status\": \"completed\",\n        \"vaccineCode\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/cvx\",\n              \"code\": \"141\",\n              \"display\": \"Influenza, split virus, trivalent, preservative\"\n            }\n          ],\n          \"text\": \"Influenza estacional\"\n        },\n        \"patient\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"occurrenceDateTime\": \"2025-04-03T10:10:00-05:00\",\n        \"recorded\": \"2025-04-03\",\n        \"primarySource\": true,\n        \"lotNumber\": \"FLU-25-0417\",\n        \"expirationDate\": \"2025-12-31\",\n        \"site\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"368208006\",\n              \"display\": \"Left upper arm structure\"\n            }\n          ],\n          \"text\": \"Brazo izquierdo\"\n        },\n        \"route\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration\",\n              \"code\": \"IM\",\n              \"display\": \"Injection, intramuscular\"\n            }\n          ],\n          \"text\": \"Intramuscular\"\n        },\n        \"doseQuantity\": {\n          \"value\": 0.5,\n          \"unit\": \"mL\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"mL\"\n        },\n        \"protocolApplied\": [\n          {\n            \"series\": \"Campaña de influenza 2025\",\n            \"targetDisease\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"6142004\",\n                    \"display\": \"Influenza\"\n                  }\n                ],\n                \"text\": \"Influenza\"\n              }\n            ],\n            \"doseNumberPositiveInt\": 1\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:7a34d1ce-2f4f-5266-bcba-2bfbbc582b04\",\n      \"resource\": {\n        \"resourceType\": \"Immunization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Refuerzo de Td (tétanos y difteria), 0,5 mL IM en el brazo derecho, lote TD-24-1180.</p></div>\"\n        },\n        \"status\": \"completed\",\n        \"vaccineCode\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/cvx\",\n              \"code\": \"09\",\n              \"display\": \"Td (adult), 2 Lf tetanus toxoid, preservative free, adsorbed\"\n            }\n          ],\n          \"text\": \"Td (tétanos y difteria, adultos)\"\n        },\n        \"patient\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"occurrenceDateTime\": \"2025-04-03T10:10:00-05:00\",\n        \"recorded\": \"2025-04-03\",\n        \"primarySource\": true,\n        \"lotNumber\": \"TD-24-1180\",\n        \"expirationDate\": \"2026-06-30\",\n        \"site\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"368209003\",\n              \"display\": \"Right upper arm structure\"\n            }\n          ],\n          \"text\": \"Brazo derecho\"\n        },\n        \"route\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration\",\n              \"code\": \"IM\",\n              \"display\": \"Injection, intramuscular\"\n            }\n          ],\n          \"text\": \"Intramuscular\"\n        },\n        \"doseQuantity\": {\n          \"value\": 0.5,\n          \"unit\": \"mL\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"mL\"\n        },\n        \"protocolApplied\": [\n          {\n            \"series\": \"Esquema de adultos (refuerzo cada 10 años)\",\n            \"targetDisease\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"76902006\",\n                    \"display\": \"Tetanus\"\n                  }\n                ],\n                \"text\": \"Tétanos\"\n              }\n            ],\n            \"doseNumberPositiveInt\": 4,\n            \"seriesDosesPositiveInt\": 4\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:6d3eb46f-ac7b-58bc-9045-ff178b9f174a\",\n      \"resource\": {\n        \"resourceType\": \"Procedure\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda, 10 de junio de 2025.</p><p>Resultado: exitoso. Control en 2 semanas.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/procedimiento\",\n            \"value\": \"PROC-2025-0001\"\n          }\n        ],\n        \"basedOn\": [\n          {\n            \"reference\": \"urn:uuid:c193b719-cfb2-5785-8823-e945606fdc45\",\n            \"display\": \"Plan de tratamiento del cáncer de mama\"\n          }\n        ],\n        \"status\": \"completed\",\n        \"category\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"387713003\",\n              \"display\": \"Surgical procedure\"\n            }\n          ],\n          \"text\": \"Procedimiento quirúrgico\"\n        },\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"64368001\",\n              \"display\": \"Partial mastectomy\"\n            }\n          ],\n          \"text\": \"Mastectomía parcial\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"performedDateTime\": \"2025-06-10T08:00:00-05:00\",\n        \"reasonReference\": [\n          {\n            \"reference\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n            \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n          }\n        ],\n        \"bodySite\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"80248007\",\n                \"display\": \"Left breast structure\"\n              }\n            ],\n            \"text\": \"Mama izquierda\"\n          }\n        ],\n        \"outcome\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"385669000\",\n              \"display\": \"Successful\"\n            }\n          ],\n          \"text\": \"Exitoso\"\n        },\n        \"followUp\": [\n          {\n            \"text\": \"Control de herida quirúrgica en 2 semanas y valoración por oncología.\"\n          }\n        ],\n        \"note\": [\n          {\n            \"text\": \"Márgenes quirúrgicos libres de tumor.\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:700c2dc9-fcb4-56fe-b789-6b32667f9cd3\",\n      \"resource\": {\n        \"resourceType\": \"DiagnosticReport\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Informe de anatomía patológica: carcinoma ductal infiltrante de mama izquierda de 3,5 cm,</p><p>receptor de estrógeno positivo (Allred 8).</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/informe\",\n            \"value\": \"INF-AP-2025-0457\"\n          }\n        ],\n        \"status\": \"final\",\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\n                \"code\": \"SP\",\n                \"display\": \"Surgical Pathology\"\n              }\n            ],\n            \"text\": \"Anatomía patológica\"\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"11526-1\",\n              \"display\": \"Pathology study\"\n            }\n          ],\n          \"text\": \"Estudio de patología\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectiveDateTime\": \"2025-05-12\",\n        \"issued\": \"2025-05-13T12:00:00-05:00\",\n        \"performer\": [\n          {\n            \"reference\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n            \"display\": \"Hospital General Docente Ejemplo\"\n          }\n        ],\n        \"conclusion\": \"Carcinoma ductal infiltrante de mama izquierda, 3,5 cm, receptor de estrógeno positivo.\",\n        \"conclusionCode\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"254837009\",\n                \"display\": \"Malignant neoplasm of breast\"\n              }\n            ],\n            \"text\": \"Cáncer de mama\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:c193b719-cfb2-5785-8823-e945606fdc45\",\n      \"resource\": {\n        \"resourceType\": \"CarePlan\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Plan de tratamiento del comité de tumores (20 de mayo de 2025):</p><p>1) mastectomía parcial; 2) quimioterapia con doxorrubicina, 4 ciclos; 3) hormonoterapia con tamoxifeno por 5 años.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/plan\",\n            \"value\": \"PLAN-2025-0001\"\n          }\n        ],\n        \"status\": \"active\",\n        \"intent\": \"plan\",\n        \"category\": [\n          {\n            \"text\": \"Plan de tratamiento oncológico\"\n          }\n        ],\n        \"title\": \"Plan de tratamiento del cáncer de mama\",\n        \"description\": \"Tratamiento acordado por el comité de tumores de mama.\",\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"period\": {\n          \"start\": \"2025-05-20\",\n          \"end\": \"2030-10-31\"\n        },\n        \"created\": \"2025-05-20\",\n        \"author\": {\n          \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n          \"display\": \"Dr. Ruiz · Oncología clínica\"\n        },\n        \"addresses\": [\n          {\n            \"reference\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n            \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n          }\n        ],\n        \"activity\": [\n          {\n            \"detail\": {\n              \"kind\": \"ServiceRequest\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"64368001\",\n                    \"display\": \"Partial mastectomy\"\n                  }\n                ],\n                \"text\": \"Mastectomía parcial\"\n              },\n              \"status\": \"scheduled\",\n              \"scheduledPeriod\": {\n                \"start\": \"2025-06-10\",\n                \"end\": \"2025-06-10\"\n              },\n              \"performer\": [\n                {\n                  \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n                  \"display\": \"Dr. Ruiz · Oncología clínica\"\n                }\n              ],\n              \"description\": \"Mastectomía parcial de la mama izquierda\"\n            }\n          },\n          {\n            \"detail\": {\n              \"kind\": \"MedicationRequest\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"367336001\",\n                    \"display\": \"Chemotherapy\"\n                  }\n                ],\n                \"text\": \"Quimioterapia\"\n              },\n              \"status\": \"not-started\",\n              \"scheduledPeriod\": {\n                \"start\": \"2025-07-01\",\n                \"end\": \"2025-09-30\"\n              },\n              \"performer\": [\n                {\n                  \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n                  \"display\": \"Dr. Ruiz · Oncología clínica\"\n                }\n              ],\n              \"description\": \"Doxorrubicina 60 mg/m² cada 21 días, 4 ciclos\"\n            }\n          },\n          {\n            \"detail\": {\n              \"kind\": \"MedicationRequest\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"169413002\",\n                    \"display\": \"Hormone therapy\"\n                  }\n                ],\n                \"text\": \"Hormonoterapia\"\n              },\n              \"status\": \"not-started\",\n              \"scheduledPeriod\": {\n                \"start\": \"2025-10-15\",\n                \"end\": \"2030-10-15\"\n              },\n              \"performer\": [\n                {\n                  \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n                  \"display\": \"Dr. Ruiz · Oncología clínica\"\n                }\n              ],\n              \"description\": \"Tamoxifeno 20 mg diarios por 5 años\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:6fcc22a2-86d1-5ef6-a254-6f6770b5ef60\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Intoxicación alimentaria bacteriana, no especificada (moderada).</p><p>Inicio: 17 de marzo de 2025. Resuelta.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/condicion\",\n            \"value\": \"COND-2025-0001\"\n          }\n        ],\n        \"clinicalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n              \"code\": \"resolved\",\n              \"display\": \"Resolved\"\n            }\n          ]\n        },\n        \"verificationStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\n              \"code\": \"confirmed\",\n              \"display\": \"Confirmed\"\n            }\n          ]\n        },\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n                \"code\": \"encounter-diagnosis\",\n                \"display\": \"Encounter Diagnosis\"\n              }\n            ]\n          }\n        ],\n        \"severity\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"6736007\",\n              \"display\": \"Moderate (severity modifier)\"\n            }\n          ],\n          \"text\": \"Moderada\"\n        },\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/icd-10\",\n              \"code\": \"A05.9\",\n              \"display\": \"Bacterial foodborne intoxication, unspecified\"\n            }\n          ],\n          \"text\": \"Intoxicación alimentaria bacteriana, no especificada\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"onsetDateTime\": \"2025-03-17\",\n        \"abatementDateTime\": \"2025-03-24\",\n        \"recordedDate\": \"2025-03-20\",\n        \"evidence\": [\n          {\n            \"code\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"422587007\",\n                    \"display\": \"Nausea\"\n                  }\n                ],\n                \"text\": \"Náuseas\"\n              },\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"422400008\",\n                    \"display\": \"Vomiting\"\n                  }\n                ],\n                \"text\": \"Vómito\"\n              },\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"21522001\",\n                    \"display\": \"Abdominal pain\"\n                  }\n                ],\n                \"text\": \"Dolor abdominal\"\n              },\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"62315008\",\n                    \"display\": \"Diarrhea\"\n                  }\n                ],\n                \"text\": \"Diarrea\"\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/19-resumen-ips/soluciones/19b_bundle_ips.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"bundleIpsId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"bundleIpsId\", id);",
                  "console.log(\"bundleIpsId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "19d · Leer el IPS",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Bundle/{{bundleIpsId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "19e · Error a propósito: un IPS sin la sección de alergias",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              },
              {
                "key": "Content-Type",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Bundle",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"resourceType\": \"Bundle\",\n  \"identifier\": {\n    \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n    \"value\": \"IPS-2026-0099\"\n  },\n  \"type\": \"document\",\n  \"timestamp\": \"2026-02-15T10:05:00-05:00\",\n  \"entry\": [\n    {\n      \"fullUrl\": \"urn:uuid:71f58005-a7dd-50ea-b9a2-c9b70638ce0b\",\n      \"resource\": {\n        \"resourceType\": \"Composition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Resumen internacional del paciente (IPS) de Luis Alberto Paredes Cevallos,</p><p>emitido el 15 de febrero de 2026 por el servicio de Oncología Clínica.</p></div>\"\n        },\n        \"identifier\": {\n          \"system\": \"https://f-slg.github.io/aprende-fhir/sid/documento\",\n          \"value\": \"IPS-2026-0099\"\n        },\n        \"status\": \"final\",\n        \"type\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"60591-5\",\n              \"display\": \"Patient summary Document\"\n            }\n          ],\n          \"text\": \"Resumen del paciente\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"date\": \"2026-02-15T10:00:00-05:00\",\n        \"author\": [\n          {\n            \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n            \"display\": \"Dr. Ruiz · Oncología clínica\"\n          }\n        ],\n        \"title\": \"Resumen internacional del paciente\",\n        \"confidentiality\": \"N\",\n        \"custodian\": {\n          \"reference\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n          \"display\": \"Hospital General Docente Ejemplo\"\n        },\n        \"section\": [\n          {\n            \"title\": \"Problemas activos\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"11450-4\",\n                  \"display\": \"Problem list - Reported\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carcinoma ductal infiltrante de mama izquierda (activo, desde mayo de 2025).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n                \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Medicación\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"10160-0\",\n                  \"display\": \"History of Medication use Narrative\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Losartán 50 mg por vía oral una vez al día (hipertensión arterial).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:1c8d9299-5780-580f-8c4f-338a8adaf567\",\n                \"display\": \"Losartán 50 mg diarios\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Vacunas\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"11369-6\",\n                  \"display\": \"History of Immunization note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Influenza estacional (3 de abril de 2025).</p><p>Td, refuerzo (3 de abril de 2025).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:1c23a482-34bb-5dc6-b674-31cd0c22e699\",\n                \"display\": \"Influenza, 3 de abril de 2025\"\n              },\n              {\n                \"reference\": \"urn:uuid:7a34d1ce-2f4f-5266-bcba-2bfbbc582b04\",\n                \"display\": \"Td, 3 de abril de 2025\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Procedimientos\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"47519-4\",\n                  \"display\": \"History of Procedures Document\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda (10 de junio de 2025), exitosa.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:6d3eb46f-ac7b-58bc-9045-ff178b9f174a\",\n                \"display\": \"Mastectomía parcial\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Resultados\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"30954-2\",\n                  \"display\": \"Relevant diagnostic tests/laboratory data note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Anatomía patológica: carcinoma ductal infiltrante de 3,5 cm, receptor de estrógeno positivo (Allred 8).</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:700c2dc9-fcb4-56fe-b789-6b32667f9cd3\",\n                \"display\": \"Informe de patología\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Plan de tratamiento\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"18776-5\",\n                  \"display\": \"Plan of care note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Plan del comité de tumores: cirugía, quimioterapia (4 ciclos) y hormonoterapia;</p><p>tamoxifeno suspendido en febrero de 2026 por intolerancia.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:c193b719-cfb2-5785-8823-e945606fdc45\",\n                \"display\": \"Plan de tratamiento del cáncer de mama\"\n              }\n            ]\n          },\n          {\n            \"title\": \"Antecedentes\",\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://loinc.org\",\n                  \"code\": \"11348-0\",\n                  \"display\": \"History of Past illness note\"\n                }\n              ]\n            },\n            \"text\": {\n              \"status\": \"generated\",\n              \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Intoxicación alimentaria bacteriana (marzo de 2025), resuelta.</p></div>\"\n            },\n            \"entry\": [\n              {\n                \"reference\": \"urn:uuid:6fcc22a2-86d1-5ef6-a254-6f6770b5ef60\",\n                \"display\": \"Intoxicación alimentaria\"\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n      \"resource\": {\n        \"resourceType\": \"Patient\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Luis Alberto Paredes Cevallos, hombre, nacido el 12 de marzo de 1979 en Riobamba.</p><p>Cédula ficticia 9900000017 · Historia clínica HC-000123.</p><p>Teléfono +593 99 000 0000 · Casado.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"NI\",\n                  \"display\": \"National unique individual identifier\"\n                }\n              ],\n              \"text\": \"Cédula de identidad\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/cedula\",\n            \"value\": \"9900000017\"\n          },\n          {\n            \"use\": \"usual\",\n            \"type\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0203\",\n                  \"code\": \"MR\",\n                  \"display\": \"Medical record number\"\n                }\n              ],\n              \"text\": \"Historia clínica\"\n            },\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/historia-clinica/hospital-general-docente-ejemplo\",\n            \"value\": \"HC-000123\"\n          }\n        ],\n        \"active\": true,\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Luis Alberto Paredes Cevallos\",\n            \"family\": \"Paredes Cevallos\",\n            \"_family\": {\n              \"extension\": [\n                {\n                  \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-fathers-family\",\n                  \"valueString\": \"Paredes\"\n                },\n                {\n                  \"url\": \"http://hl7.org/fhir/StructureDefinition/humanname-mothers-family\",\n                  \"valueString\": \"Cevallos\"\n                }\n              ]\n            },\n            \"given\": [\n              \"Luis\",\n              \"Alberto\"\n            ]\n          },\n          {\n            \"use\": \"usual\",\n            \"text\": \"Luis Paredes\"\n          }\n        ],\n        \"gender\": \"male\",\n        \"birthDate\": \"1979-03-12\",\n        \"address\": [\n          {\n            \"use\": \"home\",\n            \"type\": \"physical\",\n            \"line\": [\n              \"Av. de los Ejemplos N00-00 y calle Ficticia\"\n            ],\n            \"city\": \"Quito\",\n            \"district\": \"Quito\",\n            \"state\": \"Pichincha\",\n            \"country\": \"EC\"\n          }\n        ],\n        \"communication\": [\n          {\n            \"language\": {\n              \"coding\": [\n                {\n                  \"system\": \"urn:ietf:bcp:47\",\n                  \"code\": \"es\",\n                  \"display\": \"Spanish\"\n                }\n              ],\n              \"text\": \"Español\"\n            },\n            \"preferred\": true\n          }\n        ],\n        \"extension\": [\n          {\n            \"url\": \"http://hl7.org/fhir/StructureDefinition/patient-birthPlace\",\n            \"valueAddress\": {\n              \"city\": \"Riobamba\",\n              \"state\": \"Chimborazo\",\n              \"country\": \"EC\"\n            }\n          }\n        ],\n        \"telecom\": [\n          {\n            \"system\": \"phone\",\n            \"value\": \"+593 99 000 0000\",\n            \"use\": \"mobile\"\n          }\n        ],\n        \"maritalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-MaritalStatus\",\n              \"code\": \"M\",\n              \"display\": \"Married\"\n            }\n          ],\n          \"text\": \"Casado\"\n        }\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:a36b7bd8-06d2-5884-a3de-a13c48d07d5e\",\n      \"resource\": {\n        \"resourceType\": \"Practitioner\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dr. Esteban Patricio Ruiz Montalvo, oncólogo clínico. Registro profesional ficticio RP-000733.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"use\": \"official\",\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/registro-profesional\",\n            \"value\": \"RP-000733\"\n          }\n        ],\n        \"active\": true,\n        \"name\": [\n          {\n            \"use\": \"official\",\n            \"text\": \"Dr. Esteban Patricio Ruiz Montalvo\",\n            \"prefix\": [\n              \"Dr.\"\n            ],\n            \"family\": \"Ruiz Montalvo\",\n            \"given\": [\n              \"Esteban\",\n              \"Patricio\"\n            ]\n          }\n        ],\n        \"gender\": \"male\",\n        \"qualification\": [\n          {\n            \"code\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0360\",\n                  \"code\": \"MD\",\n                  \"display\": \"Doctor of Medicine\"\n                }\n              ],\n              \"text\": \"Médico\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n      \"resource\": {\n        \"resourceType\": \"PractitionerRole\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Dr. Esteban Patricio Ruiz Montalvo: oncólogo clínico en el Hospital General Docente Ejemplo.</p></div>\"\n        },\n        \"active\": true,\n        \"practitioner\": {\n          \"reference\": \"urn:uuid:a36b7bd8-06d2-5884-a3de-a13c48d07d5e\",\n          \"display\": \"Dr. Esteban Patricio Ruiz Montalvo\"\n        },\n        \"organization\": {\n          \"reference\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n          \"display\": \"Hospital General Docente Ejemplo\"\n        },\n        \"code\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/practitioner-role\",\n                \"code\": \"doctor\",\n                \"display\": \"Doctor\"\n              }\n            ],\n            \"text\": \"Médico\"\n          }\n        ],\n        \"specialty\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"394593009\",\n                \"display\": \"Medical oncology\"\n              }\n            ],\n            \"text\": \"Oncología clínica\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n      \"resource\": {\n        \"resourceType\": \"Organization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Hospital General Docente Ejemplo, parte de la Red de Servicios de Salud Ejemplo (ficticia).</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/establecimiento\",\n            \"value\": \"HGDE-0001\"\n          }\n        ],\n        \"active\": true,\n        \"type\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/organization-type\",\n                \"code\": \"prov\",\n                \"display\": \"Healthcare Provider\"\n              }\n            ]\n          }\n        ],\n        \"name\": \"Hospital General Docente Ejemplo\",\n        \"telecom\": [\n          {\n            \"system\": \"phone\",\n            \"value\": \"+593 2 000 0000\",\n            \"use\": \"work\"\n          }\n        ],\n        \"address\": [\n          {\n            \"line\": [\n              \"Av. Principal Ejemplo S00-00\"\n            ],\n            \"city\": \"Quito\",\n            \"state\": \"Pichincha\",\n            \"country\": \"EC\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Carcinoma ductal infiltrante de mama izquierda (activo, confirmado).</p><p>Diagnóstico: 13 de mayo de 2025.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/condicion\",\n            \"value\": \"COND-2025-0002\"\n          }\n        ],\n        \"clinicalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n              \"code\": \"active\",\n              \"display\": \"Active\"\n            }\n          ]\n        },\n        \"verificationStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\n              \"code\": \"confirmed\",\n              \"display\": \"Confirmed\"\n            }\n          ]\n        },\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n                \"code\": \"problem-list-item\",\n                \"display\": \"Problem List Item\"\n              }\n            ]\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/icd-10\",\n              \"code\": \"C50.9\",\n              \"display\": \"Breast, unspecified\"\n            },\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"254837009\",\n              \"display\": \"Malignant neoplasm of breast\"\n            }\n          ],\n          \"text\": \"Carcinoma ductal infiltrante de mama izquierda\"\n        },\n        \"bodySite\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"80248007\",\n                \"display\": \"Left breast structure\"\n              }\n            ],\n            \"text\": \"Mama izquierda\"\n          }\n        ],\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"onsetDateTime\": \"2025-05-13\",\n        \"recordedDate\": \"2025-05-13\",\n        \"evidence\": [\n          {\n            \"detail\": [\n              {\n                \"reference\": \"urn:uuid:700c2dc9-fcb4-56fe-b789-6b32667f9cd3\",\n                \"display\": \"Informe de patología AP-2025-0457\"\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:1c8d9299-5780-580f-8c4f-338a8adaf567\",\n      \"resource\": {\n        \"resourceType\": \"MedicationStatement\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Toma losartán 50 mg por vía oral una vez al día para la hipertensión, desde 2021.</p></div>\"\n        },\n        \"status\": \"active\",\n        \"medicationCodeableConcept\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"373567002\",\n              \"display\": \"Losartan\"\n            }\n          ],\n          \"text\": \"Losartán\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectivePeriod\": {\n          \"start\": \"2021-06\"\n        },\n        \"dateAsserted\": \"2025-03-20\",\n        \"informationSource\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"reasonCode\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"38341003\",\n                \"display\": \"Hypertensive disorder, systemic arterial\"\n              }\n            ],\n            \"text\": \"Hipertensión arterial\"\n          }\n        ],\n        \"dosage\": [\n          {\n            \"text\": \"50 mg por vía oral una vez al día\",\n            \"timing\": {\n              \"repeat\": {\n                \"frequency\": 1,\n                \"period\": 1,\n                \"periodUnit\": \"d\"\n              }\n            },\n            \"route\": {\n              \"coding\": [\n                {\n                  \"system\": \"http://snomed.info/sct\",\n                  \"code\": \"26643006\",\n                  \"display\": \"Oral route\"\n                }\n              ],\n              \"text\": \"Vía oral\"\n            },\n            \"doseAndRate\": [\n              {\n                \"doseQuantity\": {\n                  \"value\": 50,\n                  \"unit\": \"mg\",\n                  \"system\": \"http://unitsofmeasure.org\",\n                  \"code\": \"mg\"\n                }\n              }\n            ]\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:1c23a482-34bb-5dc6-b674-31cd0c22e699\",\n      \"resource\": {\n        \"resourceType\": \"Immunization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Vacuna contra la influenza estacional, 0,5 mL IM en el brazo izquierdo, lote FLU-25-0417.</p></div>\"\n        },\n        \"status\": \"completed\",\n        \"vaccineCode\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/cvx\",\n              \"code\": \"141\",\n              \"display\": \"Influenza, split virus, trivalent, preservative\"\n            }\n          ],\n          \"text\": \"Influenza estacional\"\n        },\n        \"patient\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"occurrenceDateTime\": \"2025-04-03T10:10:00-05:00\",\n        \"recorded\": \"2025-04-03\",\n        \"primarySource\": true,\n        \"lotNumber\": \"FLU-25-0417\",\n        \"expirationDate\": \"2025-12-31\",\n        \"site\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"368208006\",\n              \"display\": \"Left upper arm structure\"\n            }\n          ],\n          \"text\": \"Brazo izquierdo\"\n        },\n        \"route\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration\",\n              \"code\": \"IM\",\n              \"display\": \"Injection, intramuscular\"\n            }\n          ],\n          \"text\": \"Intramuscular\"\n        },\n        \"doseQuantity\": {\n          \"value\": 0.5,\n          \"unit\": \"mL\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"mL\"\n        },\n        \"protocolApplied\": [\n          {\n            \"series\": \"Campaña de influenza 2025\",\n            \"targetDisease\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"6142004\",\n                    \"display\": \"Influenza\"\n                  }\n                ],\n                \"text\": \"Influenza\"\n              }\n            ],\n            \"doseNumberPositiveInt\": 1\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:7a34d1ce-2f4f-5266-bcba-2bfbbc582b04\",\n      \"resource\": {\n        \"resourceType\": \"Immunization\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Refuerzo de Td (tétanos y difteria), 0,5 mL IM en el brazo derecho, lote TD-24-1180.</p></div>\"\n        },\n        \"status\": \"completed\",\n        \"vaccineCode\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/cvx\",\n              \"code\": \"09\",\n              \"display\": \"Td (adult), 2 Lf tetanus toxoid, preservative free, adsorbed\"\n            }\n          ],\n          \"text\": \"Td (tétanos y difteria, adultos)\"\n        },\n        \"patient\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"occurrenceDateTime\": \"2025-04-03T10:10:00-05:00\",\n        \"recorded\": \"2025-04-03\",\n        \"primarySource\": true,\n        \"lotNumber\": \"TD-24-1180\",\n        \"expirationDate\": \"2026-06-30\",\n        \"site\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"368209003\",\n              \"display\": \"Right upper arm structure\"\n            }\n          ],\n          \"text\": \"Brazo derecho\"\n        },\n        \"route\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/v3-RouteOfAdministration\",\n              \"code\": \"IM\",\n              \"display\": \"Injection, intramuscular\"\n            }\n          ],\n          \"text\": \"Intramuscular\"\n        },\n        \"doseQuantity\": {\n          \"value\": 0.5,\n          \"unit\": \"mL\",\n          \"system\": \"http://unitsofmeasure.org\",\n          \"code\": \"mL\"\n        },\n        \"protocolApplied\": [\n          {\n            \"series\": \"Esquema de adultos (refuerzo cada 10 años)\",\n            \"targetDisease\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"76902006\",\n                    \"display\": \"Tetanus\"\n                  }\n                ],\n                \"text\": \"Tétanos\"\n              }\n            ],\n            \"doseNumberPositiveInt\": 4,\n            \"seriesDosesPositiveInt\": 4\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:6d3eb46f-ac7b-58bc-9045-ff178b9f174a\",\n      \"resource\": {\n        \"resourceType\": \"Procedure\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Mastectomía parcial de mama izquierda, 10 de junio de 2025.</p><p>Resultado: exitoso. Control en 2 semanas.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/procedimiento\",\n            \"value\": \"PROC-2025-0001\"\n          }\n        ],\n        \"basedOn\": [\n          {\n            \"reference\": \"urn:uuid:c193b719-cfb2-5785-8823-e945606fdc45\",\n            \"display\": \"Plan de tratamiento del cáncer de mama\"\n          }\n        ],\n        \"status\": \"completed\",\n        \"category\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"387713003\",\n              \"display\": \"Surgical procedure\"\n            }\n          ],\n          \"text\": \"Procedimiento quirúrgico\"\n        },\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"64368001\",\n              \"display\": \"Partial mastectomy\"\n            }\n          ],\n          \"text\": \"Mastectomía parcial\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"performedDateTime\": \"2025-06-10T08:00:00-05:00\",\n        \"reasonReference\": [\n          {\n            \"reference\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n            \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n          }\n        ],\n        \"bodySite\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"80248007\",\n                \"display\": \"Left breast structure\"\n              }\n            ],\n            \"text\": \"Mama izquierda\"\n          }\n        ],\n        \"outcome\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"385669000\",\n              \"display\": \"Successful\"\n            }\n          ],\n          \"text\": \"Exitoso\"\n        },\n        \"followUp\": [\n          {\n            \"text\": \"Control de herida quirúrgica en 2 semanas y valoración por oncología.\"\n          }\n        ],\n        \"note\": [\n          {\n            \"text\": \"Márgenes quirúrgicos libres de tumor.\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:700c2dc9-fcb4-56fe-b789-6b32667f9cd3\",\n      \"resource\": {\n        \"resourceType\": \"DiagnosticReport\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Informe de anatomía patológica: carcinoma ductal infiltrante de mama izquierda de 3,5 cm,</p><p>receptor de estrógeno positivo (Allred 8).</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/informe\",\n            \"value\": \"INF-AP-2025-0457\"\n          }\n        ],\n        \"status\": \"final\",\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/v2-0074\",\n                \"code\": \"SP\",\n                \"display\": \"Surgical Pathology\"\n              }\n            ],\n            \"text\": \"Anatomía patológica\"\n          }\n        ],\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://loinc.org\",\n              \"code\": \"11526-1\",\n              \"display\": \"Pathology study\"\n            }\n          ],\n          \"text\": \"Estudio de patología\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"effectiveDateTime\": \"2025-05-12\",\n        \"issued\": \"2025-05-13T12:00:00-05:00\",\n        \"performer\": [\n          {\n            \"reference\": \"urn:uuid:57ab9932-e9b4-51d3-8dcd-658bedcb7cc7\",\n            \"display\": \"Hospital General Docente Ejemplo\"\n          }\n        ],\n        \"conclusion\": \"Carcinoma ductal infiltrante de mama izquierda, 3,5 cm, receptor de estrógeno positivo.\",\n        \"conclusionCode\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://snomed.info/sct\",\n                \"code\": \"254837009\",\n                \"display\": \"Malignant neoplasm of breast\"\n              }\n            ],\n            \"text\": \"Cáncer de mama\"\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:c193b719-cfb2-5785-8823-e945606fdc45\",\n      \"resource\": {\n        \"resourceType\": \"CarePlan\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Plan de tratamiento del comité de tumores (20 de mayo de 2025):</p><p>1) mastectomía parcial; 2) quimioterapia con doxorrubicina, 4 ciclos; 3) hormonoterapia con tamoxifeno por 5 años.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/plan\",\n            \"value\": \"PLAN-2025-0001\"\n          }\n        ],\n        \"status\": \"active\",\n        \"intent\": \"plan\",\n        \"category\": [\n          {\n            \"text\": \"Plan de tratamiento oncológico\"\n          }\n        ],\n        \"title\": \"Plan de tratamiento del cáncer de mama\",\n        \"description\": \"Tratamiento acordado por el comité de tumores de mama.\",\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"period\": {\n          \"start\": \"2025-05-20\",\n          \"end\": \"2030-10-31\"\n        },\n        \"created\": \"2025-05-20\",\n        \"author\": {\n          \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n          \"display\": \"Dr. Ruiz · Oncología clínica\"\n        },\n        \"addresses\": [\n          {\n            \"reference\": \"urn:uuid:a235f0f0-af9a-59ea-90b5-acfe6c6ee325\",\n            \"display\": \"Carcinoma ductal infiltrante de mama izquierda\"\n          }\n        ],\n        \"activity\": [\n          {\n            \"detail\": {\n              \"kind\": \"ServiceRequest\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"64368001\",\n                    \"display\": \"Partial mastectomy\"\n                  }\n                ],\n                \"text\": \"Mastectomía parcial\"\n              },\n              \"status\": \"scheduled\",\n              \"scheduledPeriod\": {\n                \"start\": \"2025-06-10\",\n                \"end\": \"2025-06-10\"\n              },\n              \"performer\": [\n                {\n                  \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n                  \"display\": \"Dr. Ruiz · Oncología clínica\"\n                }\n              ],\n              \"description\": \"Mastectomía parcial de la mama izquierda\"\n            }\n          },\n          {\n            \"detail\": {\n              \"kind\": \"MedicationRequest\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"367336001\",\n                    \"display\": \"Chemotherapy\"\n                  }\n                ],\n                \"text\": \"Quimioterapia\"\n              },\n              \"status\": \"not-started\",\n              \"scheduledPeriod\": {\n                \"start\": \"2025-07-01\",\n                \"end\": \"2025-09-30\"\n              },\n              \"performer\": [\n                {\n                  \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n                  \"display\": \"Dr. Ruiz · Oncología clínica\"\n                }\n              ],\n              \"description\": \"Doxorrubicina 60 mg/m² cada 21 días, 4 ciclos\"\n            }\n          },\n          {\n            \"detail\": {\n              \"kind\": \"MedicationRequest\",\n              \"code\": {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"169413002\",\n                    \"display\": \"Hormone therapy\"\n                  }\n                ],\n                \"text\": \"Hormonoterapia\"\n              },\n              \"status\": \"not-started\",\n              \"scheduledPeriod\": {\n                \"start\": \"2025-10-15\",\n                \"end\": \"2030-10-15\"\n              },\n              \"performer\": [\n                {\n                  \"reference\": \"urn:uuid:dd91e0ce-7db7-5ab2-aca0-52a76742dfd5\",\n                  \"display\": \"Dr. Ruiz · Oncología clínica\"\n                }\n              ],\n              \"description\": \"Tamoxifeno 20 mg diarios por 5 años\"\n            }\n          }\n        ]\n      }\n    },\n    {\n      \"fullUrl\": \"urn:uuid:6fcc22a2-86d1-5ef6-a254-6f6770b5ef60\",\n      \"resource\": {\n        \"resourceType\": \"Condition\",\n        \"text\": {\n          \"status\": \"generated\",\n          \"div\": \"<div xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><p>Intoxicación alimentaria bacteriana, no especificada (moderada).</p><p>Inicio: 17 de marzo de 2025. Resuelta.</p></div>\"\n        },\n        \"identifier\": [\n          {\n            \"system\": \"https://f-slg.github.io/aprende-fhir/sid/condicion\",\n            \"value\": \"COND-2025-0001\"\n          }\n        ],\n        \"clinicalStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\n              \"code\": \"resolved\",\n              \"display\": \"Resolved\"\n            }\n          ]\n        },\n        \"verificationStatus\": {\n          \"coding\": [\n            {\n              \"system\": \"http://terminology.hl7.org/CodeSystem/condition-ver-status\",\n              \"code\": \"confirmed\",\n              \"display\": \"Confirmed\"\n            }\n          ]\n        },\n        \"category\": [\n          {\n            \"coding\": [\n              {\n                \"system\": \"http://terminology.hl7.org/CodeSystem/condition-category\",\n                \"code\": \"encounter-diagnosis\",\n                \"display\": \"Encounter Diagnosis\"\n              }\n            ]\n          }\n        ],\n        \"severity\": {\n          \"coding\": [\n            {\n              \"system\": \"http://snomed.info/sct\",\n              \"code\": \"6736007\",\n              \"display\": \"Moderate (severity modifier)\"\n            }\n          ],\n          \"text\": \"Moderada\"\n        },\n        \"code\": {\n          \"coding\": [\n            {\n              \"system\": \"http://hl7.org/fhir/sid/icd-10\",\n              \"code\": \"A05.9\",\n              \"display\": \"Bacterial foodborne intoxication, unspecified\"\n            }\n          ],\n          \"text\": \"Intoxicación alimentaria bacteriana, no especificada\"\n        },\n        \"subject\": {\n          \"reference\": \"urn:uuid:e0a33887-7d17-5a74-b931-ff942cb15b50\",\n          \"display\": \"Luis Alberto Paredes Cevallos\"\n        },\n        \"onsetDateTime\": \"2025-03-17\",\n        \"abatementDateTime\": \"2025-03-24\",\n        \"recordedDate\": \"2025-03-20\",\n        \"evidence\": [\n          {\n            \"code\": [\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"422587007\",\n                    \"display\": \"Nausea\"\n                  }\n                ],\n                \"text\": \"Náuseas\"\n              },\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"422400008\",\n                    \"display\": \"Vomiting\"\n                  }\n                ],\n                \"text\": \"Vómito\"\n              },\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"21522001\",\n                    \"display\": \"Abdominal pain\"\n                  }\n                ],\n                \"text\": \"Dolor abdominal\"\n              },\n              {\n                \"coding\": [\n                  {\n                    \"system\": \"http://snomed.info/sct\",\n                    \"code\": \"62315008\",\n                    \"display\": \"Diarrhea\"\n                  }\n                ],\n                \"text\": \"Diarrea\"\n              }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Cuerpo: `modulos/19-resumen-ips/errores/19e1_ips_sin_alergias.json`"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});",
                  "const id = pm.response.json().id;",
                  "pm.collectionVariables.set(\"errorIpsId\", id);",
                  "if (pm.environment.name) pm.environment.set(\"errorIpsId\", id);",
                  "console.log(\"errorIpsId = \" + id);"
                ]
              }
            }
          ]
        },
        {
          "name": "19f · Borrar el IPS incompleto",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Bundle/{{errorIpsId}}"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "19g · Expediente completo del paciente ($everything)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/fhir+json"
              }
            ],
            "url": "{{FHIRURL}}/Patient/{{patientId}}/$everything"
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Respuesta exitosa (2xx)\", function () {",
                  "    pm.expect(pm.response.code).to.be.within(200, 299);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "FHIRURL",
      "value": "https://hapi.fhir.org/baseR4"
    },
    {
      "key": "TXURL",
      "value": "https://tx.fhir.org/r4"
    },
    {
      "key": "errorPatientId",
      "value": ""
    },
    {
      "key": "patientId",
      "value": ""
    },
    {
      "key": "practitionerId",
      "value": ""
    },
    {
      "key": "organizationId",
      "value": ""
    },
    {
      "key": "hospitalId",
      "value": ""
    },
    {
      "key": "conditionIntoxId",
      "value": ""
    },
    {
      "key": "encounterId",
      "value": ""
    },
    {
      "key": "obsPAId",
      "value": ""
    },
    {
      "key": "obsTempId",
      "value": ""
    },
    {
      "key": "obsFRId",
      "value": ""
    },
    {
      "key": "obsFCId",
      "value": ""
    },
    {
      "key": "errorObsId",
      "value": ""
    },
    {
      "key": "allergyId",
      "value": ""
    },
    {
      "key": "medStatementId",
      "value": ""
    },
    {
      "key": "motherHistoryId",
      "value": ""
    },
    {
      "key": "nursePractitionerId",
      "value": ""
    },
    {
      "key": "vaccinationEncounterId",
      "value": ""
    },
    {
      "key": "fluImmunizationId",
      "value": ""
    },
    {
      "key": "tdImmunizationId",
      "value": ""
    },
    {
      "key": "errorImmId",
      "value": ""
    },
    {
      "key": "compositionId",
      "value": ""
    },
    {
      "key": "bundleDocId",
      "value": ""
    },
    {
      "key": "officeLocationId",
      "value": ""
    },
    {
      "key": "salazarRoleId",
      "value": ""
    },
    {
      "key": "oncologistId",
      "value": ""
    },
    {
      "key": "oncologistRoleId",
      "value": ""
    },
    {
      "key": "noduleEncounterId",
      "value": ""
    },
    {
      "key": "ultrasoundRequestId",
      "value": ""
    },
    {
      "key": "ultrasoundReportId",
      "value": ""
    },
    {
      "key": "biopsyRequestId",
      "value": ""
    },
    {
      "key": "referralId",
      "value": ""
    },
    {
      "key": "bodyStructureId",
      "value": ""
    },
    {
      "key": "specimenId",
      "value": ""
    },
    {
      "key": "obsTumorId",
      "value": ""
    },
    {
      "key": "obsREId",
      "value": ""
    },
    {
      "key": "diagnosticReportId",
      "value": ""
    },
    {
      "key": "conditionCancerId",
      "value": ""
    },
    {
      "key": "careTeamId",
      "value": ""
    },
    {
      "key": "goalControlId",
      "value": ""
    },
    {
      "key": "goalQualityId",
      "value": ""
    },
    {
      "key": "carePlanId",
      "value": ""
    },
    {
      "key": "consentId",
      "value": ""
    },
    {
      "key": "errorConsentId",
      "value": ""
    },
    {
      "key": "procedureId",
      "value": ""
    },
    {
      "key": "dayHospitalLocationId",
      "value": ""
    },
    {
      "key": "scheduleId",
      "value": ""
    },
    {
      "key": "slot1Id",
      "value": ""
    },
    {
      "key": "appointment1Id",
      "value": ""
    },
    {
      "key": "slot2Id",
      "value": ""
    },
    {
      "key": "appointment2Id",
      "value": ""
    },
    {
      "key": "errorAppointmentId",
      "value": ""
    },
    {
      "key": "obsBSAId",
      "value": ""
    },
    {
      "key": "medReqDoxoId",
      "value": ""
    },
    {
      "key": "medAdminDoxoId",
      "value": ""
    },
    {
      "key": "medReqTamoxId",
      "value": ""
    },
    {
      "key": "medAdminTamoxId",
      "value": ""
    },
    {
      "key": "errorMedReqId",
      "value": ""
    },
    {
      "key": "questionnaireId",
      "value": ""
    },
    {
      "key": "responseOctoberId",
      "value": ""
    },
    {
      "key": "responseJanuaryId",
      "value": ""
    },
    {
      "key": "profileId",
      "value": ""
    },
    {
      "key": "codeSystemId",
      "value": ""
    },
    {
      "key": "valueSetId",
      "value": ""
    },
    {
      "key": "compositionIpsId",
      "value": ""
    },
    {
      "key": "bundleIpsId",
      "value": ""
    },
    {
      "key": "errorIpsId",
      "value": ""
    }
  ]
}
