ตรวจสอบความสมบูรณ์ person and patient ก่อนส่ง 43 แฟ้ม

More
6 ปี 11 เดือน ที่ผ่านมา #10 โดย admin
update การศึกษาที่มาค่าว่างให้เป็น 9
select * from person where (education="" or education is null)
update person set education="9" ,last_update=NOW() where (education="" or education is null)

update อาชีพที่มีค่าว่างให้เป็น 000
select * from person where (occupation ="" or occupation is null)
update person set occupation="000" where (occupation ="" or occupation is null)

update ศาสนา ที่มีค่าว่างให้เป็น 99
select * from person where (religion="" or religion is null)
update person set religion="99" where (religion="" or religion is null)

ตรวจสอบสัญชาติที่มีค่าว่าง ให้ pcu แก้มือ
select * from person where (nationality="" or nationality is null)

ตรวจสอบเชื้อชาติที่มีค่าว่าง ให้ pcu แก้มือ
select * from person where (citizenship="" or citizenship is null)
update person set citizenship="99" where (citizenship="" or citizenship is null)

*update สถานะบุคคลเท่ากับ 4 นอกเขต
select * from person where (house_regist_type_id ="" or house_regist_type_id is null)
update person set house_regist_type_id="4" ,last_update=NOW() where (house_regist_type_id ="" or house_regist_type_id is null)
patient Type Area
select * from patient where (type_area ="" or type_area is null)
update patient set type_area="4" ,last_update=NOW() where (type_area ="" or type_area is null)
New Update TypeArea And last_update
update patient set type_area ="4" ,last_update=NOW()
where hn in (select distinct hn from ovst where vstdate between "2016-01-01" and "2016-02-08")
and (type_area <>"4" or type_area is null or type_area ="")
ตรวจสอบการอยู่อาศัย เจ้าของบ้าน/ผู้อาศัย ที่เป็นค่าว่างตาราง person ปรับปรุง ให้เป็น 2 ผู้อาศัย
select * from person where (person_house_position_id is null or person_house_position_id="")
ปรับปรุงการอยู่อาศัย เจ้าของบ้าน/ผู้อาศัย ที่เป็นค่าว่างตาราง person ปรับปรุง ให้เป็น 2 ผู้อาศัย
update person set person_house_position_id="2",last_update=NOW() where (person_house_position_id is null or person_house_position_id="")


ตรวจสอบการอยู่อาศัย เจ้าของบ้าน/ผู้อาศัย ที่เป็นค่าว่างตาราง patient ปรับปรุง ให้เป็น 2 ผู้อาศัย
select family_status from patient where (family_status is null or family_status ="")
ปรับปรุงการอยู่อาศัย เจ้าของบ้าน/ผู้อาศัย ที่เป็นค่าว่างตาราง patient ปรับปรุง ให้เป็น 2 ผู้อาศัย
update patient set family_status="2" where (family_status is null or family_status ="")

ตรวจสอบประเภทที่อยู่อาศัยที่เป็นค่าว่าง
select * from house where (house_type_id="" or house_type_id is null)
ประปรุงประเภทที่อยู่อาศัยที่เป็นค่าว่าง ปรับให้เป็น 1= บ้าน
update house set house_type_id="1" where (house_type_id="" or house_type_id is null)

แก้ไขการลงทะเบียนโรคเรื้อรังมากกว่า 1 โรค
select * from clinic_persist_icd where icd10='E785'
delete from clinic_persist_icd where icd10='E785'

ตรวจสอบสถานะสิ้นสุดการให้บริการ
select * from ovst where ovstost is null and vstdate>"2016-08-31"

update ovst set rfrocs='1' where (rfrocs='' or rfrocs is null)
AND ovstost='54'
AND vstdate between '2016-10-01' AND '2016-10-30'

กรุณา เข้าสู่ระบบ หรือ สมัครสมาชิกใหม่ เพื่อเข้าร่วมวงสนทนา

เวลาที่ใช้ในการสร้างหน้าเว็บ: 0.162 วินาที
ขับเคลื่อนโดย ระบบฟอรัม Kunena