Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions configuration/appframework/patient_dashboard_extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[
{
"id": "ces.overallActions.downloadFrontPage",
"extensionPointId": "patientDashboard.overallActions",
"type": "link",
"label": "ces.downloadFrontPage",
"url": "module/pihcore/downloadReport.form?reportUuid=8be6802f-74a6-11f0-96a7-2ed2f846759c&patientId={{patient.patientId}}",
"icon": "fas fa-fw fa-download",
"order": 50
},
{
"id": "ces.overallActions.downloadClinicalHistory",
"extensionPointId": "patientDashboard.overallActions",
"type": "link",
"label": "ces.downloadClinicalHistory",
"url": "module/pihcore/downloadReport.form?reportUuid=004edb19-a3ac-11f0-9112-b688702e33e5&patientId={{patient.patientId}}",
"icon": "fas fa-fw fa-download",
"order": 51
}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had accidentally named this system_administration_extension.json when I added it initially, which isn't the right name, but more importantly would end up overwriting this file from config-pihemr: https://github.com/PIH/openmrs-config-pihemr/blob/master/configuration/appframework/system_administration_extension.json , so any of those extensions were being accidentally removed. You can likely confirm this on ces-ci @dmdesimone

]
11 changes: 0 additions & 11 deletions configuration/appframework/system_administration_extension.json

This file was deleted.

3 changes: 2 additions & 1 deletion configuration/messageproperties/metadata_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ coreapps.Diagnosis.Certainty.CONFIRMED=First time
mirebalais.dispensing.medicationInstructions=Administration Instructions
ces.dispensing.frequency=Frecuencia
ces.dispensing.timing.dosing=ej: #tablets, #ml
ces.downloadFrontPage=Download Front Sheet
ces.downloadFrontPage=Download Front Sheet
ces.downloadClinicalHistory=Download Clinical History
3 changes: 2 additions & 1 deletion configuration/messageproperties/metadata_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ pih.app.6cceab45-756f-427b-b2da-0e469d4a87e0.programStatistics.title=Tablero de
mirebalais.dispensing.medicationInstructions=Instrucciones (v\u00EDa de administraci\u00F3n, indicaciones para uso)
ces.dispensing.frequency=Frecuencia
ces.dispensing.timing.dosing=ej: #tabletas, #ml
ces.downloadFrontPage=Descargar Hoja Frontal
ces.downloadFrontPage=Descargar Hoja Frontal
ces.downloadClinicalHistory=Descargar Historia Clínica
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
key: "historiaClinicaSinglePatient"
uuid: "004edb19-a3ac-11f0-9112-b688702e33e5"
name: "Historia Clínica"
description: "Historia Clínica"
parameters:
- key: "patientId"
type: "java.lang.Integer"
label: "PID"
datasets:
- key: "historiaClinica"
type: "sql"
config: "sql/historiaClinica.sql"
designs:
- type: "excel"
template: "templates/historiaClinica.xls"
properties:
repeatingSections: "sheet:1,dataset:historiaClinica"

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
-- set @startDate = '2025-06-01';
-- set @endDate = '2025-12-31';
-- set @startDate = '2025-06-01';
-- set @endDate = '2025-12-31';
-- set @patientId = 2337;

set SESSION group_concat_max_len = 1000000;

Expand All @@ -14,7 +15,8 @@ create temporary table temp_hc
encounter_id int(11),
patient_id int(11),
visit_id int(11),
encounter_datetime datetime,
encounter_date date,
sheet_name varchar(100),
location_id int(11),
location_name varchar(255),
full_facility_name text,
Expand Down Expand Up @@ -109,13 +111,15 @@ breast_exam_obs_group_id int(11),
breast_exam_comments text
);

insert into temp_hc (encounter_id, patient_id, location_id, encounter_datetime, entry_date, visit_id)
select encounter_id, patient_id, location_id, encounter_datetime, date(date_created), visit_id
insert into temp_hc (encounter_id, patient_id, location_id, encounter_date, entry_date, visit_id)
select encounter_id, patient_id, location_id, date(encounter_datetime), date(date_created), visit_id
FROM encounter e
where e.voided = 0
AND e.encounter_type in (@historiaClinicaEnc)
AND date(e.encounter_datetime) >= @startDate
AND date(e.encounter_datetime) <= @endDate;
AND (
(@patientId is not null and e.patient_id = @patientId) or
(@patientId is null and date(e.encounter_datetime) >= @startDate and date(e.encounter_datetime) <= @endDate)
);

create index temp_hc_ei on temp_hc(encounter_id);
create index temp_hc_pi on temp_hc(patient_id);
Expand Down Expand Up @@ -642,8 +646,14 @@ set @rr = concept_from_mapping('PIH','5242');
update temp_hc
set rr = obs_value_numeric_from_temp_using_concept_id(vitals_encounter_id, @rr);

-- sheet name
update temp_hc set sheet_name = if(@patientId is null, concat(lastname, '-'), '');
update temp_hc set sheet_name = concat(sheet_name, date_format(encounter_date, '%Y-%m-%d'), ' ', encounter_id);

select
encounter_id,
encounter_date,
sheet_name,
full_facility_name,
location_name,
lastname,
Expand Down
Binary file not shown.