-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathliquibase-mexico.xml
More file actions
29 lines (26 loc) · 1.45 KB
/
liquibase-mexico.xml
File metadata and controls
29 lines (26 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-2.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<!--
This changset never appears to have run because this file was not processed prior to:
https://pihemr.atlassian.net/browse/UHM-6709
Original ticket about this here:
https://pihemr.atlassian.net/browse/UHM-5527
<changeSet id="20210628-cleanup-encounters-without-visits" author="bistenes">
<comment>Assign encounters (other than registration) that don't have visits to whatever visit is on the same day, if there is one</comment>
<sql>
update encounter e, encounter_type et, visit v
set e.visit_id = v.visit_id,
e.location_id = v.location_id
where e.encounter_type = et.encounter_type_id
and et.name != 'Enregistrement de patient'
and e.visit_id is null
and v.patient_id = e.patient_id
and date(v.date_started) = date(e.encounter_datetime)
and v.voided = 0;
</sql>
</changeSet>
-->
</databaseChangeLog>