{"id":373,"date":"2025-02-01T12:36:30","date_gmt":"2025-02-01T05:36:30","guid":{"rendered":"https:\/\/divisionksn.moph.go.th\/digital\/?page_id=373"},"modified":"2025-02-01T12:39:45","modified_gmt":"2025-02-01T05:39:45","slug":"%e0%b8%82%e0%b9%89%e0%b8%ad%e0%b8%a1%e0%b8%b9%e0%b8%a5%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%94%e0%b8%b3%e0%b9%80%e0%b8%99%e0%b8%b4%e0%b8%99%e0%b8%87%e0%b8%b2%e0%b8%99%e0%b8%82%e0%b8%b1%e0%b8%9a%e0%b9%80","status":"publish","type":"page","link":"https:\/\/divisionksn.moph.go.th\/digital\/?page_id=373","title":{"rendered":"\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e01\u0e32\u0e23\u0e14\u0e33\u0e40\u0e19\u0e34\u0e19\u0e07\u0e32\u0e19\u0e02\u0e31\u0e1a\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19 \u0e41\u0e1c\u0e19\u0e17\u0e35\u0e48\u0e2a\u0e38\u0e02\u0e20\u0e32\u0e1e \u0e08\u0e31\u0e07\u0e2b\u0e27\u0e31\u0e14\u0e01\u0e32\u0e2c\u0e2a\u0e34\u0e19\u0e18\u0e38\u0e4c"},"content":{"rendered":"\n<p>\u0e04\u0e39\u0e48\u0e21\u0e37\u0e2d <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\">\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 Mysql \u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01 HIS<\/span><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>HOSxP<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>select p2.provis_code as \"\u0e04\u0e33\u0e19\u0e33\u0e2b\u0e19\u0e49\u0e32\",\np.fname as \"\u0e0a\u0e37\u0e48\u0e2d\",\np.lname as \"\u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25\",\np.sex as \"\u0e40\u0e1e\u0e28\",\nright(concat('0',day(p.birthdate)),2) as \"\u0e27\u0e31\u0e19\u0e40\u0e01\u0e34\u0e14\",\nright(concat('0',month(p.birthdate)),2) as \"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e40\u0e01\u0e34\u0e14\",\nyear(p.birthdate) as \"\u0e1b\u0e35\u0e40\u0e01\u0e34\u0e14\",\np.cid as \"\u0e40\u0e25\u0e02\u0e1a\u0e31\u0e15\u0e23\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e0a\u0e19\",\np.house_regist_type_id as \"\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e32\u0e28\u0e31\u0e22\",\nconcat(v.address_id,right(concat('0',v.village_moo),2)) as \"\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e32\u0e28\u0e31\u0e22\",\nv.village_name as \"\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e21\u0e39\u0e48\u0e1a\u0e49\u0e32\u0e19\",\nh.address as \"\u0e1a\u0e49\u0e32\u0e19\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48\",\nh.road as \"\u0e0a\u0e37\u0e48\u0e2d\u0e16\u0e19\u0e19\",\nCASE \n  WHEN p.pttype = \"74\" THEN \"2\"\n  WHEN p.chronic_disease_list = \"\u0e42\u0e23\u0e04\u0e40\u0e1a\u0e32\u0e2b\u0e27\u0e32\u0e19\" or \"\u0e42\u0e23\u0e04\u0e04\u0e27\u0e32\u0e21\u0e14\u0e31\u0e19\" THEN \"1\"\n  \n ELSE \" \"\n END AS \"\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e1c\u0e39\u0e49\u0e1b\u0e48\u0e27\u0e22\"\n\nfrom person p\nleft join pname p2 on p.pname=p2.`name`\nleft join house h on p.house_id=h.house_id\nleft join village v on h.village_id=v.village_id\nleft join patient p3 on p.patient_hn=p3.hn\nwhere p.house_regist_type_id in(1,3) and v.village_moo&lt;>0 and p.nationality=99 and p.person_discharge_id=9<\/code><\/pre>\n\n\n\n<p>2. JHCIS<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT\nperson.prename AS `\u0e04\u0e4d\u0e32\u0e19\u0e4d\u0e32\u0e2b\u0e19\u0e49\u0e32`,\nperson.fname AS `\u0e0a\u0e37\u0e48\u0e2d`,\nperson.lname AS `\u0e19\u0e32\u0e21\u0e2a\u0e01\u0e38\u0e25`,\nperson.sex AS `\u0e40\u0e1e\u0e28`,\nright(birth,2) AS `\u0e27\u0e31\u0e19\u0e40\u0e01\u0e34\u0e14`,\nmid(birth,6,2) AS `\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e40\u0e01\u0e34\u0e14`,\nYEAR(birth) AS `\u0e1b\u0e35\u0e40\u0e01\u0e34\u0e14`,\nperson.idcard AS `\u0e40\u0e25\u0e02\u0e1a\u0e31\u0e15\u0e23\u0e1b\u0e23\u0e30\u0e0a\u0e32\u0e0a\u0e19`,\nperson.typelive AS `\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e32\u0e28\u0e31\u0e22`,\nhouse.villcode AS `\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e2d\u0e32\u0e28\u0e31\u0e22`,\nvillage.villname AS `\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e21\u0e39\u0e48\u0e1a\u0e49\u0e32\u0e19`,\nperson.hnomoi AS `\u0e1a\u0e49\u0e32\u0e19\u0e40\u0e25\u0e02\u0e17\u0e35\u0e48`,\nhouse.road AS `\u0e0a\u0e37\u0e48\u0e2d\u0e16\u0e19\u0e19`,\n'' AS `\u0e1b\u0e23\u0e30\u0e40\u0e20\u0e17\u0e1c\u0e39\u0e49\u0e1b\u0e48\u0e27\u0e22`,\n'' AS \u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\u0e40\u0e14\u0e34\u0e19\u0e17\u0e32\u0e07\nFROM\nperson\nINNER JOIN house ON person.hcode = house.hcode\nINNER JOIN village ON house.pcucode = village.pcucode AND house.villcode = village.villcode\nWHERE\nperson.typelive &lt;> '4' AND\nperson.dischargetype = '9'<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0e04\u0e39\u0e48\u0e21\u0e37\u0e2d \u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 Mysql \u0e14\u0e36\u0e07\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\u0e08\u0e32\u0e01 HIS 2. JHCIS<\/p>\n","protected":false},"author":3,"featured_media":126,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"template\/fullwidth.php","meta":{"footnotes":""},"class_list":["post-373","page","type-page","status-publish","has-post-thumbnail","hentry"],"_links":{"self":[{"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/pages\/373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=373"}],"version-history":[{"count":3,"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/pages\/373\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/pages\/373\/revisions\/377"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=\/wp\/v2\/media\/126"}],"wp:attachment":[{"href":"https:\/\/divisionksn.moph.go.th\/digital\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}