Bundle Precarga de Instituciones

Consideraciones

  1. Se debe generar un uuid para recurso en el campo fullUrl de cada entry.
  2. Cada uuid será la forma de relacionar cada entry
  3. Deberá poner atención a cada sección de request, las cuales proveen información para el servidor para ubicar recursos en caso de existir previamente.

Bundle de Precarga de datos

{
    "resourceType": "Bundle",
    "meta": {
        "profile": "http://ssms.cl/fhir/StructureDefinition/PocBundlePreCarga"
    },
    "type": "transaction",
    "entry":  [
        {
            "fullUrl": "urn:uuid:9851b64a-84d1-11ea-bc55-0242ac130003",
            "resource": {
                "resourceType": "Organization",
                "meta": {
                    "profile": "http://ssms.cl/fhir/StructureDefinition/PocOrganization"
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>"
                },
                "identifier":  [
                    {
                        "use": "official",
                        "system": "http://ssms.cl/Institucion",
                        "value": "001"
                    }
                ],
                "active": true,
                "type":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/organization-type",
                                "code": "prov",
                                "display": "Healthcare Provider"
                            }
                        ]
                    }
                ],
                "name": "Hospital"
            },
            "request": {
                "method": "PUT",
                "url": "Organization?identifier=http://ssms.cl/Institucion|001"
            }
        },
        {
            "fullUrl": "urn:uuid:88e5b636-9ece-11ea-bb37-0242ac130002",
            "resource": {
                "resourceType": "Organization",
                "meta": {
                    "profile": "http://ssms.cl/fhir/StructureDefinition/PocOrganization"
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>"
                },
                "identifier":  [
                    {
                        "use": "official",
                        "system": "http://ssms.cl/Institucion",
                        "value": "002"
                    }
                ],
                "active": true,
                "type":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/organization-type",
                                "code": "prov",
                                "display": "Healthcare Provider"
                            }
                        ]
                    }
                ],
                "name": "Hospital"
            },
            "request": {
                "method": "PUT",
                "url": "Organization?identifier=http://ssms.cl/Institucion|002"
            }
        },
        {
            "fullUrl": "urn:uuid:3db6bfac-9ece-11ea-bb37-0242ac130002",
            "resource": {
                "resourceType": "Location",
                "meta": {
                    "profile": "http://ssms.cl/fhir/StructureDefinition/PocLocationHospital"
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>"
                },
                "identifier":  [
                    {
                        "use": "official",
                        "system": "http://ssms.cl/HOSPITAL",
                        "value": "11-1111"
                    }
                ],
                "name": "Hospital-TEST 1",
                "managingOrganization": {
                    "reference": "urn:uuid:9851b64a-84d1-11ea-bc55-0242ac130003"
                }
            },
            "request": {
                "method": "PUT",
                "url": "Location?identifier=http://ssms.cl/HOSPITAL|11-1111"
            }
        },
        {
            "resource": {
                "resourceType": "HealthcareService",
                "meta": {
                    "profile": "http://ssms.cl/fhir/StructureDefinition/PocHealthcareService"
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>"
                },
                "name": "Servicio de Urgencia de Hospital-TEST 1",
                "location":  [
                    {
                        "reference": "urn:uuid:3db6bfac-9ece-11ea-bb37-0242ac130002"
                    }
                ],
                "category":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/service-category",
                                "code": "35",
                                "display": "Emergency Department"
                            }
                        ],
                        "text": "Departamento de Emergencia"
                    }
                ],
                "type":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/service-type",
                                "code": "117",
                                "display": "Emergency Medical"
                            }
                        ],
                        "text": "Emergencia Medica"
                    }
                ]
            },
            "request": {
                "method": "PUT",
                "url": "HealthcareService?location.identifier=http://ssms.cl/HOSPITAL|11-1111"
            }
        },
        {
            "fullUrl": "urn:uuid:b092631e-9ece-11ea-bb37-0242ac130002",
            "resource": {
                "resourceType": "Location",
                "meta": {
                    "profile": "http://ssms.cl/fhir/StructureDefinition/PocLocationHospital"
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>"
                },
                "identifier":  [
                    {
                        "use": "official",
                        "system": "http://ssms.cl/HOSPITAL",
                        "value": "11-1114"
                    }
                ],
                "name": "Hospital-TEST 2",
                "managingOrganization": {
                    "reference": "urn:uuid:88e5b636-9ece-11ea-bb37-0242ac130002"
                }
            },
            "request": {
                "method": "PUT",
                "url": "Location?identifier=http://ssms.cl/HOSPITAL|11-1114"
            }
        },
        {
            "fullUrl": "urn:uuid:fb707268-9ece-11ea-bb37-0242ac130002",
            "resource": {
                "resourceType": "HealthcareService",
                "meta": {
                    "profile": "http://ssms.cl/fhir/StructureDefinition/PocHealthcareService"
                },
                "text": {
                    "status": "generated",
                    "div": "<div xmlns='http://www.w3.org/1999/xhtml'><a name='mm'/></div>"
                },
                "name": "Servicio de Urgencia de Hospital-TEST 2",
                "location":  [
                    {
                        "reference": "urn:uuid:b092631e-9ece-11ea-bb37-0242ac130002"
                    }
                ],
                "category":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/service-category",
                                "code": "35",
                                "display": "Emergency Department"
                            }
                        ],
                        "text": "Departamento de Emergencia"
                    }
                ],
                "type":  [
                    {
                        "coding":  [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/service-type",
                                "code": "117",
                                "display": "Emergency Medical"
                            }
                        ],
                        "text": "Emergencia Medica"
                    }
                ]
            },
            "request": {
                "method": "PUT",
                "url": "HealthcareService?location.identifier=http://ssms.cl/HOSPITAL|11-1114"
            }
        }
    ]
}