-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from endtb/ED-94
ED-94: Customize the exports functionality of endTB Bahmni for non-st…
- Loading branch information
Showing
12 changed files
with
69 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
SELECT obs0.obs_id,obs${input.depthToParent}.obs_id as parent_obs_id | ||
SELECT obs0.obs_id,obs${input.form.depthToParent}.obs_id as parent_obs_id | ||
FROM obs obs0 | ||
<#if input.depthToParent > 0> | ||
<#list 1..input.depthToParent as x> | ||
<#if input.form.depthToParent > 0> | ||
<#list 1..input.form.depthToParent as x> | ||
INNER JOIN obs obs${x} on ( obs${x}.obs_id=obs${x-1}.obs_group_id and obs${x}.voided=0 ) | ||
</#list> | ||
</#if> | ||
WHERE obs0.concept_id=${input.formName.id?c} | ||
WHERE obs0.concept_id=${input.form.formName.id?c} | ||
AND obs0.voided = 0 | ||
<#if input.parent?has_content> | ||
AND obs${input.depthToParent}.concept_id=${input.parent.formName.id?c} | ||
<#if input.form.parent?has_content> | ||
AND obs${input.form.depthToParent}.concept_id=${input.form.parent.formName.id?c} | ||
</#if> | ||
<#if input.restrictByTreatmentInitiationCohort> | ||
AND obs0.person_id in | ||
(select distinct person_id from obs where concept_id in (SELECT concept_id from concept_name where name='Treatment Initiation') and obs_group_id IS NULL and voided=0) | ||
</#if> | ||
|
||
|
||
|
This file contains 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
This file contains 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