1 ALTER TABLE form_misc_billing_options
2 ADD replacement_claim tinyint(1) DEFAULT 0;
4 ALTER TABLE insurance_data
5 ADD accept_assignment varchar(5) NOT NULL DEFAULT 'TRUE';
7 CREATE TABLE chart_tracker (
8 ct_pid int(11) NOT NULL,
9 ct_when datetime NOT NULL,
10 ct_userid bigint(20) NOT NULL DEFAULT 0,
11 ct_location varchar(31) NOT NULL DEFAULT '',
12 PRIMARY KEY (ct_pid, ct_when)
15 INSERT INTO list_options VALUES ('lists' ,'chartloc','Chart Storage Locations',1,0,0);
16 INSERT INTO list_options VALUES ('chartloc','fileroom','File Room' ,1,0,0);
18 ALTER TABLE form_encounter
19 ADD last_level_billed int NOT NULL DEFAULT 0 COMMENT '0=none, 1=ins1, 2=ins2, etc',
20 ADD last_level_closed int NOT NULL DEFAULT 0 COMMENT '0=none, 1=ins1, 2=ins2, etc',
21 ADD last_stmt_date date DEFAULT NULL,
22 ADD stmt_count int NOT NULL DEFAULT 0;
24 CREATE TABLE ar_session (
25 session_id int unsigned NOT NULL AUTO_INCREMENT,
26 payer_id int(11) NOT NULL COMMENT '0=pt else references insurance_companies.id',
27 user_id int(11) NOT NULL COMMENT 'references users.id for session owner',
28 closed tinyint(1) NOT NULL DEFAULT 0 COMMENT '0=no, 1=yes',
29 reference varchar(255) NOT NULL DEFAULT '' COMMENT 'check or EOB number',
30 check_date date DEFAULT NULL,
31 deposit_date date DEFAULT NULL,
32 pay_total decimal(12,2) NOT NULL DEFAULT 0,
33 PRIMARY KEY (session_id),
34 KEY user_closed (user_id, closed),
35 KEY deposit_date (deposit_date)
38 CREATE TABLE ar_activity (
40 encounter int(11) NOT NULL,
41 sequence_no int unsigned NOT NULL AUTO_INCREMENT,
42 code varchar(9) NOT NULL COMMENT 'empty means claim level',
43 modifier varchar(5) NOT NULL DEFAULT '',
44 payer_type int NOT NULL COMMENT '0=pt, 1=ins1, 2=ins2, etc',
45 post_time datetime NOT NULL,
46 post_user int(11) NOT NULL COMMENT 'references users.id',
47 session_id int unsigned NOT NULL COMMENT 'references ar_session.session_id',
48 memo varchar(255) NOT NULL DEFAULT '' COMMENT 'adjustment reasons go here',
49 pay_amount decimal(12,2) NOT NULL DEFAULT 0 COMMENT 'either pay or adj will always be 0',
50 adj_amount decimal(12,2) NOT NULL DEFAULT 0,
51 PRIMARY KEY (pid, encounter, sequence_no),
52 KEY session_id (session_id)