#ตรวจสอบแฟ้มchronic ว่าสมบูรณ์หรือไม่
SELECT
	personchronic.pid,
	personchronic.chroniccode,
	personchronic.datefirstdiag,
	personchronic.datedxfirst,
	personchronic.typedischart,
	personchronic.cup,
  personchronic.hospfirstdiag,
	personchronic.dateupdate
FROM
	personchronic
WHERE
	personchronic.chroniccode IS NULL
OR personchronic.datefirstdiag IS NULL
OR personchronic.datedxfirst IS NULL
OR personchronic.hospfirstdiag IS NULL
OR personchronic.cup IS NULL
OR personchronic.typedischart IS NULL
OR personchronic.dateupdate IS NULL
ORDER BY
	personchronic.pid;