วันอังคารที่ 8 กรกฎาคม พ.ศ. 2568

16แฟ้ม กายภาพ API new e-claim

 ข้อมูลรายตัว   ครบทุกรายการ ด้วย Auto_id แม้ icd9_code รหัสเดียวกัน

SELECT 

    v.auto_id,

    a.visit_id,

    a.HN,

    a.REG_DATETIME,

    ip.adm_id,

    i.dxg_id,

    v.code16 AS icd9_code,

    fs.name AS procedure_name,

    v.unit_price AS procedure_price,

v.invoice AS amount

FROM opd_visits a

LEFT JOIN visit_invoice v ON v.visit_id = a.visit_id AND v.is_cancel = 0

LEFT JOIN ipd_reg ip ON ip.visit_id = a.visit_id AND ip.is_cancel = 0

LEFT JOIN opd_diagnosis i ON a.visit_id = i.visit_id AND i.is_cancel = 0 AND i.dxt_id = '1'

LEFT JOIN fs_all fs ON fs.working_code = v.code16

WHERE a.visit_id = '0003352955'

  AND a.is_cancel = 0

  AND a.UNIT_REG = '31'

  AND v.code16 IN (

      SELECT icd9_code

      FROM icd9cm

      WHERE CGD_ID = '14'

  )

GROUP BY 

    v.auto_id, a.visit_id, i.dxg_id, fs.name, v.unit_price


ปรับใส่แฟ้ม ADP

SELECT 

    k.auto_id, 

    k.HN, 

    k.AN, 

    k.DATEOPD,

    k.TYPE, 

    k.CODE, 

    1 AS QTY, 

    SUM(k.RATE) AS RATE,

    k.SEQ, 

    k.CAGCODE, 

    k.DOSE,

    k.CA_TYPE,

    k.SERIALNO,

    k.TOTCOPAY,

    k.USE_STATUS,

    SUM(k.TOTAL) AS TOTAL,

    k.QTYDAY,

    k.TMLTCODE,

    k.STATUS1,

    k.BI,

    k.CLINIC,

    k.ITEMSRC,

    k.PROVIDER,

    k.GRAVIDA,

    k.GA_WEEK,

    k.`DCIP/E_SCREEN`,

    k.LMP


FROM (

    SELECT

        v.auto_id AS auto_id,

        a.HN,

        ip.adm_id AS AN,

        DATE_FORMAT(a.REG_DATETIME, '%Y%m%d') AS DATEOPD,

        '20' AS TYPE,

        'XXX14' AS CODE,

        1 AS QTY,

        v.invoice AS RATE,

        a.visit_id AS SEQ,

        '' AS CAGCODE,

        '' AS DOSE,

        '' AS CA_TYPE,

        '' AS SERIALNO,

        '' AS TOTCOPAY,

        '' AS USE_STATUS,

        v.invoice AS TOTAL,

        '' AS QTYDAY,

        '' AS TMLTCODE,

        '' AS STATUS1,

        '' AS BI,

        TRIM(CONCAT(

            CASE WHEN ip.adm_id != '' THEN '1' ELSE '0' END,

            i.dxg_id,

            '00'

        )) AS CLINIC,

        '1' AS ITEMSRC,

        '' AS PROVIDER,

        '' AS GRAVIDA,

        '' AS GA_WEEK,

        '' AS `DCIP/E_SCREEN`,

        '' AS LMP


    FROM opd_visits a

    LEFT JOIN visit_invoice v ON v.visit_id = a.visit_id AND v.is_cancel = 0

    LEFT JOIN ipd_reg ip ON ip.visit_id = a.visit_id AND ip.is_cancel = 0

    LEFT JOIN opd_diagnosis i ON a.visit_id = i.visit_id AND i.is_cancel = 0 AND i.dxt_id = '1'

    LEFT JOIN fs_all fs ON fs.working_code = v.code16


    WHERE a.visit_id = '$visit'

      AND a.is_cancel = 0

      AND a.UNIT_REG = '31'

      AND v.code16 IN (

        SELECT icd9_code

        FROM icd9cm

        WHERE CGD_ID = '14'

      )


    GROUP BY

        v.auto_id, a.visit_id, a.HN, ip.adm_id, a.REG_DATETIME, i.dxg_id, v.invoice

) AS k





วันพฤหัสบดีที่ 7 พฤศจิกายน พ.ศ. 2567

mbase refer

 #### Transpost 

1 เดินทางไปเอง

2 รถโรงพยาบาล พยาบาลนำส่ง 1 คน

3 รถโรงพยาบาล พยาบาลนำส่ง 2 คน

4 รถโรงพยาบาล พยาบาลนำส่ง 3 คน

5 รถโรงพยาบาล ไม่มีพยาบาลนำส่ง 

6 รถโรงพยาบาลเอกชน

วันศุกร์ที่ 4 ตุลาคม พ.ศ. 2567

วันศุกร์ที่ 9 สิงหาคม พ.ศ. 2567

view card background

  background: linear-gradient(45deg, #add8e6, #e0ffff);   สีคราม

.info-card {

            background: linear-gradient(45deg, #00aaff, #e0f7fa); /* Canva-like gradient */  ##สีฟ้าอ่อน

 .info-card {

            background: linear-gradient(45deg, #00ff00, #ccffcc); /* Canva-like gradient */  ##เขียวอ่อน

   .info-card {

           background: linear-gradient(45deg, #e0bbff, #f3e5f5); /* Purple gradient */ ##ชมพูอ่ออน



วันจันทร์ที่ 5 สิงหาคม พ.ศ. 2567

canva

 https://www.youtube.com/watch?v=3SWFGw5JPrA  //แอพขยับคน
https://www.youtube.com/watch?v=mIu0K9-2AaA&list=TLPQMDUwODIwMjTUQTp0yvceQw&index=1 /// 3 แอพหน้าเนียน การ์ตูน รูปเก่าขยาย

ทําหน้าเนียน lightroom   
ปรับสีภาพ ฟรี
https://www.youtube.com/watch?v=mUz421UogYI

https://www.youtube.com/watch?v=DzbTQn3gh3M&t=78s ## 8 ฟีเจอร์


วันศุกร์ที่ 12 กรกฎาคม พ.ศ. 2567

วันพุธที่ 17 เมษายน พ.ศ. 2567

New E-Claim API

 ได้ทำการเพิ่มบทบาทในระบบ DCenter เพื่อเข้าใช้งาน API Claim ในส่วนของ Production Zone เรียบร้อยครับ

ขอนำไฟล์แชร์ ให้ไว้ใช้โหลดเอกสารและคู่มือครับ

วันพุธที่ 6 มีนาคม พ.ศ. 2567

เทียบเวลามาตรฐาน

 ทดสอบบน Ubuntu 14.04 LTS


  1. การเทียบเวลาให้ตรงกับServer Clock ของมหาวิทยาลัย
      - ด้วยคำสั่ง sudo ntpdate winnie.rmutsv.ac.th
      - หากต้องการให้ตั้งเทียบเวลาอัตโนมัติทุกวัน ให้สร้างแฟ้มชื่อ /etc/cron.daily/update-time มีข้อมูลว่า
สร้างไฟล์  touch update-time
sudo nano /etc/cron.daily/update-time
ใส่เข้าไป
       #!/bin/bash
       /usr/sbin/ntpdate pool.ntp.org

sudo ntpdate pool.ntp.org

       แก้ไขให้แฟ้มนี้สามารถ execute ด้วยคำสั่ง sudo chmod +x /etc/cron.daily/update-time
       แล้วสั่งให้ cron ทำงานใหม่ด้วยคำสั่ง sudo service cron restart

       หากไม่ตั้งเทียบเวลาทุกวัน นาฬิกาจะเดินผิดพลาดไปวันละประมาณ 2 วินาที

ที่มา http://www.phuketadmin.org/index.php?topic=7210.0

วันพุธที่ 24 มกราคม พ.ศ. 2567

Script Backup Database

.สคริปต์สำรองข้อมูล MySQL บนระบบปฏิบัติการลีนุกซ์

1. backup_all_db.sh  ==> สำรองรวมทุกดาต้าเบสเป็น 1 ไฟล์

2. backup_all_db2.sh ==> สำรองแยกดาต้าเบสออกเป็นหลายไฟล์เท่ากับจำนวนดาต้าเบสที่มีใน MySQL Server นั้นๆ

 backup_all_db.zip

https://drive.google.com/file/d/1XQvnwVsSAwlmVgMivpxpaKPzl4Qq0a1-/view?usp=sharing

 backup_all_db2.zip

https://drive.google.com/file/d/1YgYIJ6ALNKooFhURvlKUYOTTzKwRSddj/view?usp=sharing

วันพฤหัสบดีที่ 14 ธันวาคม พ.ศ. 2566

วันศุกร์ที่ 8 ธันวาคม พ.ศ. 2566

Yii2 Spinner

html

<div id="loading-spinner" style="display: none;">

    <!-- Add your spinner image or loading text here -->

    Loading...

</div>

หรือ

<div id="loading-spinner" style="display: none; color: purple; font-size: 20px;">

    <!-- Customize the text and style as needed -->

    <strong>Loading...</strong>

</div>


<javascript>

<script>

$(document).ready(function() {

    $('.popup-link').click(function(e) {

        e.preventDefault();

        var url = $(this).data('url');

        openModalWithData(url);

    });

    $('#selectAll').click(function() {

        // Show the spinner when the button is clicked

        $('#loading-spinner').show();

    });


    // Assuming you have a form with the class 'your-form-class'

    $(document).on('beforeSubmit', 'form[name="frmMain"]', function() {

        // Show the spinner before form submission

        $('#loading-spinner').show();

        return true;

    });

    // If you're using Pjax, hide the spinner on successful Pjax response

    $(document).on('pjax:success', function() {

        $('#loading-spinner').hide();

    });


    // If you're not using Pjax, hide the spinner on any AJAX request completion

    $(document).ajaxStop(function() {

        $('#loading-spinner').hide();

    });

});

function openModalWithData(url) {

    $.ajax({

        url: url,

        method: 'GET',

        success: function(response) {

            $('#myModal .modal-body').html(response);

            $('#myModal').modal('show');

        },

        error: function() {

            alert('An error occurred while fetching data.');

        }

    });

}

</script>


วันพุธที่ 6 ธันวาคม พ.ศ. 2566

Smart Refer EMR

 git clone https://gitlab.com/smartrefer-ubonratchathani/docker-server/smartrefer-client.git

https://gitlab.com/smartrefer/smartemr-web.git

https://gitlab.com/smartrefer/smartemr-api.git

 npm i -g typescript

npm i -g ts-node

npm i -g nodemon

npm i --force

http://localhost:10021/services/visit/2023-10-01/2023-10-01


แจ้งหน่วยบริการทุกแห่งที่ใช้ smart refer

ขณะนี้ทางทีมพัฒนา ได้พัฒนาเวอร์ชั่น 5.1 (เวอร์ชั่นนี้แยกออกจากเขต8) เสร็จเรียบร้อยแล้ว 

*หมายเหตุ ให้ทุกแห่ง down server docker smart refer client และ smart emr ก่อน

แล้วจึงทำตามขั้นตอนการติดตั้งด้านล่างค่ะ


การติดตั้งโปรแกรม R10 Smart Platform

1. cd smartrefer-client 

2. docker-compose down

3. cd ..

4. remane smartrefer-client เป็น  smartrefer-client_old

5. git clone https://gitlab.com/smartrefer-ubonratchathani/docker-server/smartrefer-client.git

6.  cd smartrefer-client

7. แก้ไข ไฟล์ config.api , config.emr , config.pharmacy การเชื่อมต่อ ฐาน his รพ.

8. สั่ง docker system prune -a  แล้วตอบ y 

9. docker-compose  up แล้วลองเข้าระบบ เช่น http://192.168.1.2:8080/    , http://192.168.1.2:8080/smartemr/ ,http://192.168.1.2:8080/coc/

   9.1 ถ้าสั่ง docker-compose  up แล้ว ERROR: Network kong-network declared as external, but could not be found. Please create the network manually using docker network create kong-network and try again. **ให้สั่ง docker network create kong-network ใหม่ครับ

10. ระบบเข้าได้ปกติ ให้กดคีย์บอร์ด Ctrl + C

11. docker-compose  up -d

วันศุกร์ที่ 1 ธันวาคม พ.ศ. 2566

HAIT

 thcc.or.th/index  หนังสือ
http://thcc.or.th/ebook_shelf.html  Ebook
https://drive.google.com/drive/folders/1fWBOu9mff8O463-fiPt9BW1NqQvUmxIF///TMI
การขอรับการตรวจเยี่ยมและตรวจประเมินHAIT รบกวนศึกษาจาก file ใน folder  https://fileserv.moph.go.th/index.php/s/NN3hTcgPocIubgi  

https://tmi.or.th/wp-content/uploads/2023/12/HAIT_Plus_Guideline.pdf
https://drive.google.com/drive/folders/1rvfYS7Io7agyqYgOqbsPgv4987D_tGoE?usp=sharing?? รพ.มะเร็ง
https://pdpa.moph.go.th/pdpa/law_ict.php
https://drive.google.com/drive/folders/1CYZ2sh6LhIUjRuToCZ9pGR_aeEb-Lwj1?usp=sharing?50พรรษา
https://docs.google.com/forms/u/0/d/e/1FAIpQLScqTJbgHvzNL662lhvQ6yGXJJCKkcMEounqRS2eA61Z_jbu-g/formResponse??ประเมิน HAIT ระดับเขต

Proxmox

 https://blog.limitrack.com/proxmox-basic/

วันอังคารที่ 28 พฤศจิกายน พ.ศ. 2566

Jhcis-SQL

 https://jhcismuanglampang.blogspot.com/p/blog-page.html
https://drive.google.com/drive/folders/0B2hokdFdQRsxT2pxb1VyaGdUS2M?resourcekey=0-ctji3-1c-TioO1ao8fvcMA //ไฟล์คิวรี่

https://www.facebook.com/JhcisBetong/?locale=th_TH

โค้ดรายชื่อประชากรอายุ 20-50 ปี เป้าหมายการฉีดวัคซีน dt (เกิดตั้งแต่ 1 ม.ค.08-31 ธ.ค.38)


SELECT person.pid AS pid, concat(ctitle.titlename,person.fname,' ',person.lname)as pname, person.birth AS pbirth, GetAgeYearNum(person.birth,CURRENT_DATE)as age, person.idcard AS pcid, person.sex AS sex, person.hnomoi AS hno, person.mumoi AS mu, village.villno AS village_villno, village.villname AS village_villname FROM person INNER JOIN ctitle ON person.prename = ctitle.titlecode INNER JOIN house ON person.pcucodeperson = house.pcucode AND person.hcode = house.hcode INNER JOIN village ON house.pcucode = village.pcucode AND village.villcode = house.villcode WHERE person.typelive IN ('1','3') and person.pid not in (SELECT persondeath.pid FROM persondeath) and person.birth between '1965-01-01' and '1995-12-31' and SUBSTRING(house.villcode,7,2)<>'00' AND nation='99' order BY village.villno,person.hnomoi*1;
* สปสช.ออนไลน์
https://www.nhso.go.th/page/online_service
* Facebook สปสช.
https://www.facebook.com/NHSO.Thailand/
* Web NEW Authen
https://authenservice.nhso.go.th/authencode/#/login
* Web NEW E-Claim บันทึกข้อมูลเบิก
https://eclaim.nhso.go.th/Client/login
* Web E-claim
https://eclaim.nhso.go.th/webComponent/main/MainWebAction.do
* OP/PP Individual Records
https://op.nhso.go.th/op/main/MainWebAction.do
* รายงานระบบบริหารการเบิกจ่ายกองทุนหลักประกันสุขภาพแห่งชาติ (Smart Money Transfer)
https://smt.nhso.go.th/smtf/#/home/budget/summary
* ระบบข้อมูลพื้นฐานหน่วยบริการ (สำหรับสร้าง QR Code ในการ Scan เพื่อ Authen)
http://cpp.nhso.go.th/CPP/
* KTB
https://www.healthplatform.krungthai.com/healthPlatform/login
* ระบบบูรณาการติดตามข้อมูลการจ่ายชดเชยโรคเฉพาะ (Seamless for DMIS)
https://seamlessfordmis.nhso.go.th/seamlessfordmis/faces/login.jsf
* Drug Catalogue
http://drug.nhso.go.th/drugcatalogue
* Moph-IC
https://cvp1.moph.go.th/dashboard
* Moph Claim
https://claim-nhso.moph.go.th/nhso/
* สกส. SSOP
https://cs5.chi.or.th/ssopupload/Main
* หมอพร้อม Digital ID
https://mohpromt.moph.go.th/mpc/mp-pf/mohprompt-did/
* MOPH IDP Center (สำหรับกำหนดรายชื่อและอุปกรณ์ผู้พิสูจน์ตัวตนสำหรับหมอพร้อม)
https://phr1.moph.go.th/idpadmin
* หมอพร้อม Moph ID
https://moph.id.th/login

วันอังคารที่ 24 ตุลาคม พ.ศ. 2566

SmartEMR Smart Refer

 git clone https://gitlab.com/smartrefer-ubonratchathani/docker-server/smartrefer-client.git

https://gitlab.com/smartrefer/smartemr-web.git

https://gitlab.com/smartrefer/smartemr-api.git
http://192.168.200.92:8081/#/login   
http://192.168.200.92:8081/allergy/
http://192.168.200.92:8081/api/smartemr/
http://192.168.200.92:8081/smartemr/#/main

 docker-compose pull

 docker-compose up -d
ทดสอบ http://localhost:10021/services/visit/2023-10-01/2023-10-01

npm i -g typescript

npm i -g ts-node

npm i -g nodemon

 npm i --force

pm2 start nodemon --name xxxx
pm2 save
######## Smartemr-web๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒๒

npm i  ถ้าไม่ได้ npm i --force
npm start  รอจนกว่า Compiled เสร็จ

ng serve --host 0.0.0.0 --port 4200 
----- EMR ---
smartrefer_client

.การอัพเดทโปรแกรมเพื่อดึง images ใหม่ใชค ้ า สั่งดงัน ้ ี
docker-compose down
docker-compose pull
docker-compose up -d
คำสั่ง down = docker-compose down
คำสั่ง รัน = docker-compose up -d
คำสั่ง รันและดูError  = docker-compose up 
GET::http://192.168.200.92:8081/api/smartemr/
GET::: http://192.168.200.92:8081/api/smartemr/services/visit/2022-10-02/2022-10-30