Created
May 21, 2025 06:38
-
-
Save johngrimes/ac04fa62bc278b4ccff84d56bc44dd0c to your computer and use it in GitHub Desktop.
US Core Blood Pressure SQL on FHIR example, with Spanish translations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"resourceType": "ViewDefinition", | |
"id": "UsCoreBloodPressures", | |
"language": "en", | |
"name": "us_core_blood_pressures", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "us_core_presion_arterial" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"status": "draft", | |
"description": "A simple view of blood pressure observations, with separate columns for systolic and diastolic values.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "Una vista simple de observaciones de presión arterial, con columnas separadas para valores sistólicos y diastólicos." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"resource": "Observation", | |
"profile": [ | |
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-blood-pressure" | |
], | |
"constant": [ | |
{ | |
"name": "systolic_bp", | |
"valueCode": "8480-6" | |
}, | |
{ | |
"name": "diastolic_bp", | |
"valueCode": "8462-4" | |
}, | |
{ | |
"name": "bp_code", | |
"valueCode": "85354-9" | |
} | |
], | |
"select": [ | |
{ | |
"column": [ | |
{ | |
"path": "getResourceKey()", | |
"name": "id", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "identificador" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The unique identifier for the observation.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El identificador único para la observación." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "subject.getReferenceKey(Patient)", | |
"name": "patient_id", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "id_paciente" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "Can be used to join to patient tables created by other views.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "Se puede usar para unir con tablas de pacientes creadas por otras vistas." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "effective.ofType(dateTime)", | |
"name": "effective_date_time", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "fecha_hora_efectiva" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The date and time the observation was taken.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "La fecha y hora en que se tomó la observación." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
} | |
] | |
}, | |
{ | |
"column": [ | |
{ | |
"path": "value.ofType(Quantity).system", | |
"name": "sbp_quantity_system", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "sistema_cantidad_pas" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The code system for the systolic blood pressure value.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El sistema de códigos para el valor de la presión arterial sistólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "value.ofType(Quantity).code", | |
"name": "sbp_quantity_code", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "codigo_cantidad_pas" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The code for the systolic blood pressure value.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El código para el valor de la presión arterial sistólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "value.ofType(Quantity).unit", | |
"name": "sbp_quantity_unit", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "unidad_cantidad_pas" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The unit of measure for the systolic blood pressure value.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "La unidad de medida para el valor de la presión arterial sistólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "value.ofType(Quantity).value", | |
"name": "sbp_quantity_value", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "valor_cantidad_pas" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The value of the systolic blood pressure measurement.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El valor de la medición de la presión arterial sistólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
} | |
], | |
"forEach": "component.where(code.coding.exists(system='http://loinc.org' and code=%systolic_bp)).first()" | |
}, | |
{ | |
"column": [ | |
{ | |
"path": "value.ofType(Quantity).system", | |
"name": "dbp_quantity_system", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "sistema_cantidad_pad" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The code system for the diastolic blood pressure value.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El sistema de códigos para el valor de la presión arterial diastólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "value.ofType(Quantity).code", | |
"name": "dbp_quantity_code", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "codigo_cantidad_pad" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The code for the diastolic blood pressure value.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El código para el valor de la presión arterial diastólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "value.ofType(Quantity).unit", | |
"name": "dbp_quantity_unit", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "unidad_cantidad_pad" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The unit of measure for the diastolic blood pressure value.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "La unidad de medida para el valor de la presión arterial diastólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
}, | |
{ | |
"path": "value.ofType(Quantity).value", | |
"name": "dbp_quantity_value", | |
"_name": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "valor_cantidad_pad" | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
}, | |
"description": "The value of the diastolic blood pressure measurement.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "El valor de la medición de la presión arterial diastólica." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
} | |
], | |
"forEach": "component.where(code.coding.exists(system='http://loinc.org' and code=%diastolic_bp)).first()" | |
} | |
], | |
"where": [ | |
{ | |
"path": "code.coding.exists(system='http://loinc.org' and code=%bp_code)", | |
"description": "Only include observations with the LOINC code representing blood pressure.", | |
"_description": { | |
"extension": [ | |
{ | |
"extension": [ | |
{ | |
"url": "lang", | |
"valueCode": "es" | |
}, | |
{ | |
"url": "content", | |
"valueString": "Solo incluir observaciones con el código LOINC que representa la presión arterial." | |
} | |
], | |
"url": "http://hl7.org/fhir/StructureDefinition/translation" | |
} | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment