diff --git a/onprc_ehr/resources/queries/study/Procedure_Amended.query.xml b/onprc_ehr/resources/queries/study/Procedure_Amended.query.xml new file mode 100644 index 000000000..7be4d1136 --- /dev/null +++ b/onprc_ehr/resources/queries/study/Procedure_Amended.query.xml @@ -0,0 +1,83 @@ + + + + + Procedures Amended + + + + + + + + + Date + + + + Center Project + false + + ehr + project + project + + + + Procedure + + ehr_lookups + procedures + rowid + name + + + + Remark + false + + + Status + + core + QCState + Rowid + + + + + ehr + tasks + taskid + rowid + + + + + ehr + requests + requestid + rowid + + + + Charge Unit + + ehr_lookups + procedureChargeType + value + + + + Source + + ehr_lookups + encounter_types + value + + + +
+
+
+
\ No newline at end of file diff --git a/onprc_ehr/resources/queries/study/Procedure_Amended.sql b/onprc_ehr/resources/queries/study/Procedure_Amended.sql new file mode 100644 index 000000000..ebecb4db0 --- /dev/null +++ b/onprc_ehr/resources/queries/study/Procedure_Amended.sql @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2013 LabKey Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +SELECT + t.id, + t.date, + t.procedureid, + t.qcstate, + t.taskid, + t.type, + t.remark, + t.requestid, + t.chargetype, + t.project + + +FROM study.encounters t +Where t.type in ('Procedure') +UNION +SELECT + j.id, + j.date, +j.procedureid, + j.qcstate, + j.taskid, + j.type, + j.remark, + j.requestid, + j.chargetype, + j.project + + +FROM study.encounters j +where j.procedureid.name in ('TB Test Intradermal') + And j.type in ('Surgery') + diff --git a/onprc_ehr/resources/queries/study/Procedure_Amended/.qview.xml b/onprc_ehr/resources/queries/study/Procedure_Amended/.qview.xml new file mode 100644 index 000000000..483e3ed60 --- /dev/null +++ b/onprc_ehr/resources/queries/study/Procedure_Amended/.qview.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/onprc_ehr/resources/queries/study/Procedure_Amended/Procedure.qview.xml b/onprc_ehr/resources/queries/study/Procedure_Amended/Procedure.qview.xml new file mode 100644 index 000000000..50a0bb742 --- /dev/null +++ b/onprc_ehr/resources/queries/study/Procedure_Amended/Procedure.qview.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file