0% found this document useful (0 votes)
15 views3 pages

Database Tables and Query

Uploaded by

nonamestogive
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Database Tables and Query

Uploaded by

nonamestogive
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

USE [EasyHealth-Dev]

GO

select top 100 * from app.patient_to_healthplan /// this have empi and memberid

--update [Link] set current_status = null where empi = '2100275056'


select top 100 * from [Link] where empi = '2100275056' order by
created_datetime desc
select top 100 * from app.patient_to_client where patient_empi = '2100275056'
select top 100 * from app.patient_to_project where patient_empi = '2100275056'
select top 100 * from app.patients_to_conditions
select top 100 * from app.member_data_load_history where data_load_history_id = 111
-- data will come after upload
--update app.patient_to_project set project_id = null where patient_empi =
'2100275056'

select top 100 * from app.[data_import_logs]


select * from [Link]
select top 100 * from app.practitioner_to_organization
select top 100 * from app.patient_to_healthplan where ipa='570703619'

select * from app.user_to_role


select * from [Link]
SELECT * FROM [app].[etl_log_load_members]
SELECT top 100 * FROM [app].etl_log_load_organizations
SELECT top 100 * FROM [app].etl_log_load_practitioners_attribution
SELECT top 100 * FROM [app].etl_log_load_patients_to_project
SELECT top 100 * FROM [app].etl_log_load_practitioners_to_client
SELECT top 100 * FROM [app].etl_log_load_practitioners_to_project
SELECT top 100 * FROM [app].etl_log_load_member_conditions
SELECT top 100 * from app.

select * from patient_to_telecoms


------------------------------------------------

select top 100 * from app.data_load_history where id = 111 order by id desc


app.[member_data_load_history]
select top 100 * from app.patient_to_client where patient_empi = '2100275056'
select top 100 * from [Link] where empi = '2100275056'
select top 100 * from app.patient_to_project where patient_empi = '2100275056'
select top 100 * from [app].Project
select top 100 * from [Link]
select top 100 * from app.etl_load_members_dt
select top 100 * from app.etl_load_members_dt

SELECT top 100 * FROM [app].[master_load_type]


select top 100 * from [dbo].[member_dt]

select top 100 * from app.data_load_history order by id desc


select top 100 * from app.[member_data_load_history] order by data_load_history_id
desc
select top 100 * from [Link] order by created_datetime desc
select top 100 * from app.[member_data_load_history]
select top 100 * from app.data_import_logs order by id desc
select * from patient_to_telecoms
select empi from [Link] where active = 1 and empi not in (select patient_empi
from app.patient_to_client where active=1) and empi = '2100275056'
select empi from [Link] where active = 1 and empi not in (select patient_empi
from app.patient_to_project where active=1)and empi = '2100275056'

select * from app.globalcategory_to_code cur


on [Link]=pat.current_status and [Link]=1 and (cur.code_key='loaded' or
cur.code_key='pending_scheduling')

select * from
[Link]
encounter_statuses

--update [Link]
--set current_status = 188 where empi = '2100275056'

SELECT STRING_AGG (cli.[name],',') AS client


from app.patient_to_client incli
left join [Link] cli on [Link]=incli.client_id
WHERE [Link] =1 and incli.patient_empi='2100275056'
select * from app.data_load_history order by id desc

select top 100 * from app.data_load_history order by id desc


select mdlh.*, 'pimp', dlh.* from app.[member_data_load_history] mdlh --order by
data_load_history_id desc
join app.data_load_history dlh on mdlh.data_load_history_id = [Link] where
data_load_history_id = 108

order by data_load_history_id desc

select top 100 * from app.data_load_history order by id desc


select top 100 * from app.[member_data_load_history] order by data_load_history_id
desc
SELECT *
FROM app.globalcategory_to_code gtc
JOIN [Link] gc ON gtc.globalcategory_id = [Link]
WHERE gc.category_key = 'patients_current_status'
AND gtc.code_key = 'outreaching-initial';

select * from [Link] WHERE category_key = 'patients_current_status'


select * from app.[v_patientdetails]

select top 100 * from app.encounters_codes where encounter_id = 18114

-----------------------------------------------------------------------------------
------
edi generation
---------------

select top 100 * from app.edi837_claims ediclaim


join app.claim_info ci on ediclaim.claim_id = [Link]
join [Link] en on ci.encounter_id = [Link]
join app.edi837Batch batch on [Link] = ediclaim.edi837batch_id
order by [Link] desc

*-*-*-*-*-*-*-*-
Organization-fax-history modal
1. created table [app].[availability_org_fax_history]
2. created sp [app].[get_org_fax_history]
3. created sp [app].[save_org_fax_history]

SELECT 200 AS STATUS ,'status updated successfully.' AS [Message] ,'' AS


ErrorDetail , @idList as ids

You might also like