This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Podcast Daily Brief</title> | |
| <style> | |
| :root { --bg: #0f0f0f; --card: #1a1a1a; --text: #e0e0e0; --accent: #00d4aa; --secondary: #888; } | |
| body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 16px; line-height: 1.6; } | |
| .container { max-width: 680px; margin: 0 auto; } |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Podcast Daily Brief</title> | |
| <style> | |
| :root { | |
| --bg: #0f0f0f; | |
| --card: #1a1a1a; |
This file contains hidden or 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
| CREATE TABLE contact_relationship_ref ( | |
| relationship_id serial PRIMARY KEY, | |
| relationship_code varchar(20), | |
| relationship_name_cn varchar(255) UNIQUE NOT NULL, | |
| relationship_name_en varchar(255) UNIQUE NOT NULL, | |
| relationship_name_sets varchar(255) UNIQUE NOT NULL, --- 集合 | |
| standardized_code varchar(20) NOT NULL, | |
| standardized_name_cn varchar(255) NOT NULL, | |
| standardized_name_en varchar(255) NOT NULL, | |
| standardized_category varchar(255) , --人员关系大类 |
This file contains hidden or 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
| select | |
| ARCIM_RowId, | |
| ARCIM_Code as OI_CODE, | |
| ARCIM_Desc as OI_DESC, | |
| ARCIM_ItemCat_DR, | |
| ARCIM_ItemCat_DR->ARCIC_OrdCat_DR, | |
| NVL(ARCIM_ItemCat_DR->ARCIC_OrdCat_DR->ORCAT_Code, 'NULL') as OI_CATEGORY_CODE, | |
| NVL(ARCIM_ItemCat_DR->ARCIC_OrdCat_DR->ORCAT_Desc, 'NULL') as OI_CATEGORY_DESC, | |
| NVL(ARCIM_ItemCat_DR->ARCIC_Code, 'NULL') as OI_CATEGORY_SUB_CODE, | |
| NVL(ARCIM_ItemCat_DR->ARCIC_Desc, 'NULL') as OI_CATEGORY_SUB_DESC, |
This file contains hidden or 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
| select opv.date_wid as EpisodeDate, | |
| opv.time_wid as EpisodeTime, | |
| opv.eps_no as EpisodeNum, | |
| opv.eps_type as EpisodeType, | |
| opv.eps_subtype_desc as eps_subtype, | |
| opv.city_market as Market, | |
| opv.entity as Facility, | |
| opv.final_bu as BU, | |
| opv.dept_code , |
This file contains hidden or 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
| CREATE MATERIALIZED VIEW dm.mv_volume_patient_f | |
| TABLESPACE dm_tbls | |
| as | |
| SELECT o.eps_rowid::int AS row_id, | |
| o.appt_date::date AS day_wid, | |
| to_char(o.appt_date::date::timestamp with time zone, 'YYYY-MM'::text) AS month_wid, | |
| o.pat_rowid::int, | |
| o.eps_type, | |
| o.eps_no, | |
| o.appt_date::date AS discharge_date, |
This file contains hidden or 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
| WITH sent_surveys AS ( | |
| SELECT | |
| date_trunc('month', s.send_dt) AS survey_month, | |
| usr.episode_num, | |
| s.send_channel AS channel, | |
| usr.mrn, | |
| usr.respondent_id, | |
| pdp.pat_language, | |
| pdp.pat_nationality, | |
| CASE |
This file contains hidden or 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
| WITH s1 AS ( | |
| SELECT | |
| sst.episode_num, | |
| sst.pat_mrn, | |
| sst.channel, | |
| CASE | |
| WHEN pdp.pat_language IN ('Mandarin 普通话', 'Cantonese') THEN 'CN' | |
| WHEN pdp.pat_language IS NULL OR pdp.pat_language = 'Not stated' AND pdp.pat_nationality LIKE 'CHINA%' THEN 'CN' | |
| ELSE 'EN' | |
| END AS languageflag |
This file contains hidden or 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
| /* UFHQI2209 Event Reporting Rate(员工事件上报率)*/ | |
| /* Events Incident_Type Events */ | |
| /* QI Report Name: Rate of Staff Reported Events */ | |
| /* Numerator: Number of all "Events" AND "Notification Cases" AND "QI Trigger Events" */ | |
| /* 分母: Total Volume: IPD + OPV + ED Visits 总数显示在report表格左上角即可*/ | |
| SELECT MARKET_DESC AS Market, FAC_CODE AS FACILITY_CODE, | |
| BASE_ID, STATUS, | |
| Incident_Type, | |
| Entered_Date, | |
| EVENT_MONTHID, |
This file contains hidden or 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
| CREATE TABLE temp_duplicate_records_INVOICE AS | |
| SELECT * FROM dm.BILL_F_INVOICE WHERE 1 = 0; -- 这将创建一个与原表结构相同但没有数据的临时表 | |
| INSERT INTO temp_duplicate_records_INVOICE | |
| SELECT b.* | |
| FROM ( | |
| SELECT BILL_DAY_ID, BILL_EPS_DR, BILL_NO | |
| FROM dm.BILL_F_INVOICE | |
| WHERE BILL_DAY_ID >= '2023-07-01' | |
| GROUP BY BILL_DAY_ID, BILL_EPS_DR, BILL_NO |
NewerOlder