Merhaba Arkadaşlar,
E-reçete uygulaması kapsamında aşağıda verilen webservisi PHP ile nasıl okurum?
Aldığım hata: Kullancı adı / tesis kodu veya kullanıcı adı / doktor T.C. kimlik no uyumsuz
hem canlı hem test ortamında aynı hatayı almaktayım.
https://medeczane.sgk.gov.tr/doktor/...Servisleri.pdf
Yardımcı olurmusunuz.
Şimdiden Teşekkürler.
$client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiYardimciIslemleriWS?wsdl",array('excep tions'=>true,'trace'=>true));
$strXML = <<<XML
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Username>99999999990</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">99999999990</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
XML;
$objAuthVar = new SoapVar($strXML, XSD_ANYXML);
$objAuthHeader = new SoapHeader("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd", 'Security', $objAuthVar, false);
$client->__setSoapHeaders($objAuthHeader);
$strereceteXML=<<<XML
<IlacListesiSorguIstekDVO>
<tesisKodu>11069903</tesisKodu>
<doktorTcKimlikNo>99999999990</doktorTcKimlikNo>
<islemTarihi>27.12.2017</islemTarihi>
</IlacListesiSorguIstekDVO>
XML;
$data = $client->__soapCall("aktifIlacListesiSorgula", array('aktifIlacListesiSorgula'=>$strereceteXML));
//$data = $client->__soapCall("aktifIlacListesiSorgula", array('tesisKodu'=>'11069903','doktorTcKimlikNo'=> '99999999990','islemTarihi'=>date('Y-m-d')));
var_dump($data);
E-reçete servisleri ve PHP
21
●3.200
- 27-12-2017, 12:13:11
- 29-12-2017, 17:53:51
<IlacListesiSorguIstekDVO> <tesisKodu>11069903</tesisKodu> <doktorTcKimlikNo>99999999990</doktorTcKimlikNo> <islemTarihi>27.12.2017</islemTarihi> </IlacListesiSorguIstekDVO>
Merhaba, bu yazmış olduğun kodlarda, yukarıdaki verilerin sunucuya ulaşmadığını "__getLastRequest" methodu ile görebilirsin.
Ben çalışır şekilde ufak bir örnek paylaştım, bunun üzerinden ilerleyebilirsin.
<?php try{ $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiYardimciIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>99999999990</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">99999999990</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $parameters = []; $parameters[] = new SoapVar('11068891', XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar('99999999990', XSD_LONG, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar('29.12.2017', XSD_STRING, null, "", 'islemTarihi'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->aktifIlacListesiSorgula($parameter); print_r($results); }catch (SoapFault $e){ die('ERR: ' . $e->getMessage()); } ?> - 01-01-2018, 19:23:12Çok teşekkürler fakat çıktı : stdClass Object ( [aktifIlacListesiSorgulaReturn] => stdClass Object ( [ilacListesi] => stdClass Object ( [barkod] => 0 [sgkIlacKodu] => 0 [ambalajMiktari] => 0 [tekDozMiktari] => 0 [kutuBirimMiktari] => 0 ) [sonucKodu] => 9116 [sonucMesaji] => Kullancı adı / tesis kodu veya kullanıcı adı / doktor T.C. kimlik no uyumsuz Detay: Kullancı adı / tesis kodu veya kullanıcı adı / doktor T.C. kimlik no uyumsuz [uyariMesaji] => ) )
- 01-01-2018, 22:02:15Verdikleri doküman da doktor tc kimlik numarasını long olarak istemişler fakat test ortamında verdigi "99999999990" değer long limitini geçmekte, aşağıdaki gibi değiştirirsen büyük ihtimal sorunun düzelecektir.
<?php try{ $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiYardimciIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>99999999990</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">99999999990</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $parameters = []; $parameters[] = new SoapVar('11068891', XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar('29.12.2017', XSD_STRING, null, "", 'islemTarihi'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->aktifIlacListesiSorgula($parameter); print_r($results); }catch (SoapFault $e){ die('ERR: ' . $e->getMessage()); } ?> - 02-01-2018, 16:59:30Hocam selamlar, ne zamandır üzerine uğraştığım bir konuydu, ellerinize sağlık, çok teşekkürler.yassey adlı üyeden alıntı: mesajı görüntüle
yassey Tekrar merhaba,yassey adlı üyeden alıntı: mesajı görüntüle
Benim de bir sorum olacaktı. Gönderdiğin kodların üzerinden giderek, e reçete oluşturmaya çalışıyorum. Test ortamında "stdClass Object ( [ereceteGirisReturn] => stdClass Object ( [sonucKodu] => 9109 [sonucMesaji] => Gonderdiginiz mesaj beklenen mesaj formatina uymamaktadir. Detay: cvc-complex-type.2.4.a: Invalid content was found starting with element 'tesisKodu'. One of '{ereceteDVO}' is expected. ) )" şeklinde hata aldım. Bakmanız mümkün müdür?
try { $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiReceteIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>' . $user_medula_username . '</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $user_medula_password . '</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $parameters = []; $parameters[] = new SoapVar('11069903', XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar('99999999990', XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->ereceteGiris($parameter); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); } - 02-01-2018, 18:49:04Elektronik Reçete giriş servisinde zorunlu alanlar aşağıdadır.
EreceteDVO;
tesisKodu,tcKimlikNo,takipNo,provizyonTipi,receteT arihi,receteAltTuru,protokolNo,doktorTcKimlikNo,do ktorBransKodu,doktorSertifikaKodu, ereceteIlacListesi, ereceteTaniListesi
Doküman da bu verilerin sunucuya zorunlu gönderilmesi gerektiği belirttilmiş - 03-01-2018, 13:46:51yassey tekrar merhaba,
Öncelikle ilgin ve cevabın için çok teşekkür ederim,
Aşağıdaki eklediğim 3 farklı şekilde denedim ancak, yine aynı uyarıyı alıyorum. Bir kez daha göz atma şansın olabilir mi acaba? Şimdiden çok çok teşekkürler.
Aldığım hata hepsinde aynı;
stdClass Object ( [ereceteGirisReturn] => stdClass Object ( [sonucKodu] => 9109 [sonucMesaji] => Gonderdiginiz mesaj beklenen mesaj formatina uymamaktadir. Detay: cvc-complex-type.2.4.a: Invalid content was found starting with element 'tesisKodu'. One of '{ereceteDVO}' is expected. ) )İş yeri hekimliği için hazırlamaya çalıştığımdan taniKodu'nu göndermedim. Gerçi gönderdiğimde de aynı sonucu aldım.
if ($_POST) { $user_medula_username = trim(strip_tags($_POST['user_medula_username'])); $user_medula_password = trim(strip_tags($_POST['user_medula_password'])); $MEDULAereceteNo = ""; // ereçete kayıt no $MEDULAtesisKodu = "11069903"; // ereçetenin yazıldığı tesis kodu - isg için sabit $MEDULAtcKimlikNo = ""; // hastanın tckn $MEDULAtakipNo = ""; $MEDULAprovizyonTipi = "1"; // tablo 9e $MEDULAreceteTarihi = date('d.m.Y'); // 01.01.2018 gibi $MEDULAreceteTuru = "1"; // tablo 9a $MEDULAreceteAltTuru = "1"; // tablo 9b $MEDULAprotokolNo = ""; $MEDULAseriNo = ""; $MEDULAdoktorTcKimlikNo = "99999999990"; $MEDULAdoktorBransKodu = ""; $MEDULAdoktorSertifikaKodu = "0"; // tablo 9d $MEDULAdoktorAdi = ""; $MEDULAdoktorSoyadi = ""; $MEDULAadi = ""; // hastanın adı $MEDULAsoyadi = ""; // hastanın soyadı $MEDULAdogumTarihi = "01.01.1980"; // hastanın doğum tarihi - 01.01.1980 gibi $MEDULAcinsiyeti = "E"; // hastanın cinsiyeti - E veya K $MEDULAaciklamaTuru = "1"; // tablo 9h $MEDULAaciklama = ""; // ereçete açıklaması $MEDULAtaniKodu = ""; // ereçete tanı kodu $MEDULAtaniAdi = ""; // ereçete tanı açıklaması $MEDULAbarkod = ""; $MEDULAadet = ""; $MEDULAkullanimSekli = "1"; // tablo 9f $MEDULAkullanimDoz1 = "1"; $MEDULAkullanimDoz2 = "1"; $MEDULAkullanimPeriyot = "2"; $MEDULAkullanimPeriyotBirimi = "3"; // tablo 9g $MEDULAgeriOdemeKapsaminda = "E"; // E veya H olacak if (empty($user_medula_username) || empty($user_medula_password)) { $errormsg = "Boş Alan Bırakmayın!"; } else { try { $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiReceteIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>' . $user_medula_username . '</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $user_medula_password . '</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $parameters = []; $parameters[] = new SoapVar($MEDULAereceteNo, XSD_STRING, null, "", 'ereceteNo'); $parameters[] = new SoapVar($MEDULAtesisKodu, XSD_INT, null, "", 'tesisKodu', ''); $parameters[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo'); $parameters[] = new SoapVar($MEDULAtakipNo, XSD_STRING, null, "", 'takipNo'); $parameters[] = new SoapVar($MEDULAprovizyonTipi, XSD_INT, null, "", 'provizyonTipi', ''); $parameters[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi'); $parameters[] = new SoapVar($MEDULAreceteTuru, XSD_INT, null, "", 'receteTuru', ''); $parameters[] = new SoapVar($MEDULAreceteAltTuru, XSD_INT, null, "", 'receteAltTuru', ''); $parameters[] = new SoapVar($MEDULAprotokolNo, XSD_STRING, null, "", 'protokolNo'); $parameters[] = new SoapVar($MEDULAseriNo, XSD_STRING, null, "", 'seriNo'); $parameters[] = new SoapVar($MEDULAdoktorTcKimlikNo, XSD_STRING, null, "", 'doktorTcKimlikNo'); $parameters[] = new SoapVar($MEDULAdoktorBransKodu, XSD_INT, null, "", 'doktorBransKodu', ''); $parameters[] = new SoapVar($MEDULAdoktorSertifikaKodu, XSD_INT, null, "", 'doktorSertifikaKodu', ''); $parameters[] = new SoapVar($MEDULAdoktorAdi, XSD_STRING, null, "", 'doktorAdi'); $parameters[] = new SoapVar($MEDULAdoktorSoyadi, XSD_STRING, null, "", 'doktorSoyadi'); $parameters[] = new SoapVar($MEDULAadi, XSD_STRING, null, "", 'adi'); $parameters[] = new SoapVar($MEDULAsoyadi, XSD_STRING, null, "", 'soyadi'); $parameters[] = new SoapVar($MEDULAdogumTarihi, XSD_STRING, null, "", 'dogumTarihi'); $parameters[] = new SoapVar($MEDULAcinsiyeti, XSD_STRING, null, "", 'cinsiyeti'); $parameters[] = new SoapVar($MEDULAaciklamaTuru, XSD_INT, null, "", 'aciklamaTuru', ''); $parameters[] = new SoapVar($MEDULAaciklama, XSD_STRING, null, "", 'aciklama'); $parameters[] = new SoapVar($MEDULAtaniKodu, XSD_STRING, null, "", 'taniKodu'); $parameters[] = new SoapVar($MEDULAtaniAdi, XSD_STRING, null, "", 'taniAdi'); $parameters[] = new SoapVar($MEDULAbarkod, XSD_STRING, null, "", 'barkod'); $parameters[] = new SoapVar($MEDULAadet, XSD_INT, null, "", 'adet', ''); $parameters[] = new SoapVar($MEDULAkullanimSekli, XSD_INT, null, "", 'kullanimSekli', ''); $parameters[] = new SoapVar($MEDULAkullanimDoz1, XSD_INT, null, "", 'kullanimDoz1', ''); $parameters[] = new SoapVar($MEDULAkullanimDoz2, XSD_INT, null, "", 'kullanimDoz2', ''); $parameters[] = new SoapVar($MEDULAkullanimPeriyot, XSD_INT, null, "", 'kullanimPeriyot', ''); $parameters[] = new SoapVar($MEDULAkullanimPeriyotBirimi, XSD_INT, null, "", 'kullanimPeriyotBirimi', ''); $parameters[] = new SoapVar($MEDULAgeriOdemeKapsaminda, XSD_STRING, null, "", 'geriOdemeKapsaminda'); $parameter = [ 'arg0' => new SoapVar($parameters, SOAP_ENC_OBJECT) ]; $results = $client->ereceteGiris($parameter); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); } } }if ($_POST) { $user_medula_username = trim(strip_tags($_POST['user_medula_username'])); $user_medula_password = trim(strip_tags($_POST['user_medula_password'])); $MEDULAtesisKodu = "11069903"; // ereçetenin yazıldığı tesis kodu - isg için sabit $MEDULAtcKimlikNo = ""; // hastanın tckn $MEDULAprovizyonTipi = "1"; // tablo 9e $MEDULAreceteTarihi = date('d.m.Y'); // 01.01.2018 gibi $MEDULAreceteTuru = "1"; // tablo 9a $MEDULAreceteAltTuru = "1"; // tablo 9b $MEDULAprotokolNo = ""; $MEDULAseriNo = ""; $MEDULAdoktorTcKimlikNo = "99999999990"; $MEDULAdoktorBransKodu = ""; $MEDULAdoktorSertifikaKodu = "0"; // tablo 9d $MEDULAdoktorAdi = ""; $MEDULAdoktorSoyadi = ""; $MEDULAadi = ""; // hastanın adı $MEDULAsoyadi = ""; // hastanın soyadı $MEDULAdogumTarihi = "01.01.1980"; // hastanın doğum tarihi - 01.01.1980 gibi $MEDULAcinsiyeti = "E"; // hastanın cinsiyeti - E veya K $MEDULAaciklamaTuru = "1"; // tablo 9h $MEDULAaciklama = ""; // ereçete açıklaması $MEDULAtaniKodu = ""; // ereçete tanı kodu $MEDULAtaniAdi = ""; // ereçete tanı açıklaması $MEDULAbarkod = ""; $MEDULAadet = ""; $MEDULAkullanimSekli = "1"; // tablo 9f $MEDULAkullanimDoz1 = "1"; $MEDULAkullanimDoz2 = "1"; $MEDULAkullanimPeriyot = "2"; $MEDULAkullanimPeriyotBirimi = "3"; // tablo 9g $MEDULAgeriOdemeKapsaminda = "E"; // E veya H olacak $MEDULAilacAciklamaTuru = "1"; // tablo 9h $MEDULAilacAciklama = ""; // ereçete açıklaması if (empty($user_medula_username) || empty($user_medula_password)) { $errormsg = "Boş Alan Bırakmayın!"; } else { try { $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiReceteIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>' . $user_medula_username . '</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $user_medula_password . '</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $ereceteDVO = []; $ereceteDVO[] = new SoapVar($MEDULAtesisKodu, XSD_INT, null, "", 'tesisKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo'); $ereceteDVO[] = new SoapVar($MEDULAprovizyonTipi, XSD_INT, null, "", 'provizyonTipi', ''); $ereceteDVO[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi'); $ereceteDVO[] = new SoapVar($MEDULAreceteTuru, XSD_INT, null, "", 'receteTuru', ''); $ereceteDVO[] = new SoapVar($MEDULAreceteAltTuru, XSD_INT, null, "", 'receteAltTuru', ''); $ereceteDVO[] = new SoapVar($MEDULAprotokolNo, XSD_STRING, null, "", 'protokolNo'); $ereceteDVO[] = new SoapVar($MEDULAseriNo, XSD_STRING, null, "", 'seriNo'); $ereceteDVO[] = new SoapVar($MEDULAdoktorTcKimlikNo, XSD_STRING, null, "", 'doktorTcKimlikNo'); $ereceteDVO[] = new SoapVar($MEDULAdoktorBransKodu, XSD_INT, null, "", 'doktorBransKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAdoktorSertifikaKodu, XSD_INT, null, "", 'doktorSertifikaKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAdoktorAdi, XSD_STRING, null, "", 'doktorAdi'); $ereceteDVO[] = new SoapVar($MEDULAdoktorSoyadi, XSD_STRING, null, "", 'doktorSoyadi'); $kisiDVO[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo'); $kisiDVO[] = new SoapVar($MEDULAadi, XSD_STRING, null, "", 'adi'); $kisiDVO[] = new SoapVar($MEDULAsoyadi, XSD_STRING, null, "", 'soyadi'); $kisiDVO[] = new SoapVar($MEDULAdogumTarihi, XSD_STRING, null, "", 'dogumTarihi'); $kisiDVO[] = new SoapVar($MEDULAcinsiyeti, XSD_STRING, null, "", 'cinsiyeti'); $EreceteAciklamaDVO[] = new SoapVar($MEDULAaciklamaTuru, XSD_INT, null, "", 'aciklamaTuru', ''); $EreceteAciklamaDVO[] = new SoapVar($MEDULAaciklama, XSD_STRING, null, "", 'aciklama'); $EreceteTaniDVO[] = new SoapVar($MEDULAtaniKodu, XSD_STRING, null, "", 'taniKodu'); $EreceteTaniDVO[] = new SoapVar($MEDULAtaniAdi, XSD_STRING, null, "", 'taniAdi'); $EreceteIlacDVO[] = new SoapVar($MEDULAbarkod, XSD_STRING, null, "", 'barkod'); $EreceteIlacDVO[] = new SoapVar($MEDULAadet, XSD_INT, null, "", 'adet', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimSekli, XSD_INT, null, "", 'kullanimSekli', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimDoz1, XSD_INT, null, "", 'kullanimDoz1', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimDoz2, XSD_INT, null, "", 'kullanimDoz2', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimPeriyot, XSD_INT, null, "", 'kullanimPeriyot', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimPeriyotBirimi, XSD_INT, null, "", 'kullanimPeriyotBirimi', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAgeriOdemeKapsaminda, XSD_STRING, null, "", 'geriOdemeKapsaminda'); $EreceteIlacAciklamaDVO[] = new SoapVar($MEDULAilacAciklamaTuru, XSD_INT, null, "", 'aciklamaTuru', ''); $EreceteIlacAciklamaDVO[] = new SoapVar($MEDULAilacAciklama, XSD_STRING, null, "", 'aciklama'); $EreceteGirisIstekDVO = [ 'arg0' => new SoapVar($ereceteDVO, SOAP_ENC_OBJECT), 'arg1' => new SoapVar($kisiDVO, SOAP_ENC_OBJECT), 'arg2' => new SoapVar($EreceteAciklamaDVO, SOAP_ENC_OBJECT), 'arg3' => new SoapVar($EreceteTaniDVO, SOAP_ENC_OBJECT), 'arg4' => new SoapVar($EreceteIlacDVO, SOAP_ENC_OBJECT), 'arg5' => new SoapVar($EreceteIlacAciklamaDVO, SOAP_ENC_OBJECT) ]; $results = $client->ereceteGiris($EreceteGirisIstekDVO); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); } } }if ($_POST) { $user_medula_username = trim(strip_tags($_POST['user_medula_username'])); $user_medula_password = trim(strip_tags($_POST['user_medula_password'])); $MEDULAtesisKodu = "11069903"; // ereçetenin yazıldığı tesis kodu - isg için sabit $MEDULAtcKimlikNo = ""; // hastanın tckn $MEDULAprovizyonTipi = "1"; // tablo 9e $MEDULAreceteTarihi = date('d.m.Y'); // 01.01.2018 gibi $MEDULAreceteTuru = "1"; // tablo 9a $MEDULAreceteAltTuru = "1"; // tablo 9b $MEDULAprotokolNo = ""; $MEDULAseriNo = ""; $MEDULAdoktorTcKimlikNo = "99999999990"; $MEDULAdoktorBransKodu = ""; $MEDULAdoktorSertifikaKodu = "0"; // tablo 9d $MEDULAdoktorAdi = ""; $MEDULAdoktorSoyadi = ""; $MEDULAadi = ""; // hastanın adı $MEDULAsoyadi = ""; // hastanın soyadı $MEDULAdogumTarihi = "01.01.1980"; // hastanın doğum tarihi - 01.01.1980 gibi $MEDULAcinsiyeti = "E"; // hastanın cinsiyeti - E veya K $MEDULAaciklamaTuru = "1"; // tablo 9h $MEDULAaciklama = ""; // ereçete açıklaması $MEDULAtaniKodu = ""; // ereçete tanı kodu $MEDULAtaniAdi = ""; // ereçete tanı açıklaması $MEDULAbarkod = ""; $MEDULAadet = ""; $MEDULAkullanimSekli = "1"; // tablo 9f $MEDULAkullanimDoz1 = "1"; $MEDULAkullanimDoz2 = "1"; $MEDULAkullanimPeriyot = "2"; $MEDULAkullanimPeriyotBirimi = "3"; // tablo 9g $MEDULAgeriOdemeKapsaminda = "E"; // E veya H olacak $MEDULAilacAciklamaTuru = "1"; // tablo 9h $MEDULAilacAciklama = ""; // ereçete açıklaması if (empty($user_medula_username) || empty($user_medula_password)) { $errormsg = "Boş Alan Bırakmayın!"; } else { try { $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiReceteIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>' . $user_medula_username . '</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $user_medula_password . '</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $ereceteDVO = []; $ereceteDVO[] = new SoapVar($MEDULAtesisKodu, XSD_INT, null, "", 'tesisKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo'); $ereceteDVO[] = new SoapVar($MEDULAprovizyonTipi, XSD_INT, null, "", 'provizyonTipi', ''); $ereceteDVO[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi'); $ereceteDVO[] = new SoapVar($MEDULAreceteAltTuru, XSD_INT, null, "", 'receteAltTuru', ''); $ereceteDVO[] = new SoapVar($MEDULAprotokolNo, XSD_STRING, null, "", 'protokolNo'); $ereceteDVO[] = new SoapVar($MEDULAdoktorTcKimlikNo, XSD_STRING, null, "", 'doktorTcKimlikNo'); $ereceteDVO[] = new SoapVar($MEDULAdoktorBransKodu, XSD_INT, null, "", 'doktorBransKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAdoktorSertifikaKodu, XSD_INT, null, "", 'doktorSertifikaKodu', ''); $EreceteTaniDVO[] = new SoapVar($MEDULAtaniKodu, XSD_STRING, null, "", 'taniKodu'); $EreceteTaniDVO[] = new SoapVar($MEDULAtaniAdi, XSD_STRING, null, "", 'taniAdi'); $EreceteIlacDVO[] = new SoapVar($MEDULAbarkod, XSD_STRING, null, "", 'barkod'); $EreceteIlacDVO[] = new SoapVar($MEDULAadet, XSD_INT, null, "", 'adet', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimSekli, XSD_INT, null, "", 'kullanimSekli', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimDoz1, XSD_INT, null, "", 'kullanimDoz1', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimDoz2, XSD_INT, null, "", 'kullanimDoz2', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimPeriyot, XSD_INT, null, "", 'kullanimPeriyot', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimPeriyotBirimi, XSD_INT, null, "", 'kullanimPeriyotBirimi', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAgeriOdemeKapsaminda, XSD_STRING, null, "", 'geriOdemeKapsaminda'); $EreceteIlacAciklamaDVO[] = new SoapVar($MEDULAilacAciklamaTuru, XSD_INT, null, "", 'aciklamaTuru', ''); $EreceteIlacAciklamaDVO[] = new SoapVar($MEDULAilacAciklama, XSD_STRING, null, "", 'aciklama'); $EreceteGirisIstekDVO = [ 'arg0' => new SoapVar($ereceteDVO, SOAP_ENC_OBJECT), 'arg1' => new SoapVar($EreceteTaniDVO, SOAP_ENC_OBJECT), 'arg2' => new SoapVar($EreceteIlacDVO, SOAP_ENC_OBJECT), 'arg3' => new SoapVar($EreceteIlacAciklamaDVO, SOAP_ENC_OBJECT) ]; $results = $client->ereceteGiris($EreceteGirisIstekDVO); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); } } }Bir göz atabilirsen çok memnun olurum. Yardımların için şimdiden teşekkürler.
Sevgiler.
Bir de böyle denedim ama yine olmadı, sanıyorum konuya çok yanlış yerden bakıyorum (=
if ($_POST) { $user_medula_username = trim(strip_tags($_POST['user_medula_username'])); $user_medula_password = trim(strip_tags($_POST['user_medula_password'])); $MEDULAtesisKodu = "11069903"; // ereçetenin yazıldığı tesis kodu - isg için sabit $MEDULAtcKimlikNo = ""; // hastanın tckn $MEDULAprovizyonTipi = "1"; // tablo 9e $MEDULAreceteTarihi = date('d.m.Y'); // 01.01.2018 gibi $MEDULAreceteTuru = "1"; // tablo 9a $MEDULAreceteAltTuru = "1"; // tablo 9b $MEDULAprotokolNo = ""; $MEDULAseriNo = ""; $MEDULAdoktorTcKimlikNo = "99999999990"; $MEDULAdoktorBransKodu = ""; $MEDULAdoktorSertifikaKodu = "0"; // tablo 9d $MEDULAdoktorAdi = ""; $MEDULAdoktorSoyadi = ""; $MEDULAadi = ""; // hastanın adı $MEDULAsoyadi = ""; // hastanın soyadı $MEDULAdogumTarihi = "01.01.1980"; // hastanın doğum tarihi - 01.01.1980 gibi $MEDULAcinsiyeti = "E"; // hastanın cinsiyeti - E veya K $MEDULAaciklamaTuru = "1"; // tablo 9h $MEDULAaciklama = ""; // ereçete açıklaması $MEDULAtaniKodu = ""; // ereçete tanı kodu $MEDULAtaniAdi = ""; // ereçete tanı açıklaması $MEDULAbarkod = ""; $MEDULAadet = ""; $MEDULAkullanimSekli = "1"; // tablo 9f $MEDULAkullanimDoz1 = "1"; $MEDULAkullanimDoz2 = "1"; $MEDULAkullanimPeriyot = "2"; $MEDULAkullanimPeriyotBirimi = "3"; // tablo 9g $MEDULAgeriOdemeKapsaminda = "E"; // E veya H olacak $MEDULAilacAciklamaTuru = "1"; // tablo 9h $MEDULAilacAciklama = ""; // ereçete açıklaması if (empty($user_medula_username) || empty($user_medula_password)) { $errormsg = "Boş Alan Bırakmayın!"; } else { try { $client = new SoapClient("https://sgkt.sgk.gov.tr/medula/eczane/saglikTesisiReceteIslemleriWS?wsdl"); $wsse = '<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>' . $user_medula_username . '</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/ws ms/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">' . $user_medula_password . '</wsse:Password> </wsse:UsernameToken> </wsse:Security>'; $header_data = new SoapVar($wsse, XSD_ANYXML); $header = new SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'Security', $header_data); $client->__setSoapHeaders($header); $ereceteDVO = []; $ereceteDVO[] = new SoapVar($MEDULAtesisKodu, XSD_INT, null, "", 'tesisKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAtcKimlikNo, XSD_STRING, null, "", 'tcKimlikNo'); $ereceteDVO[] = new SoapVar($MEDULAprovizyonTipi, XSD_INT, null, "", 'provizyonTipi', ''); $ereceteDVO[] = new SoapVar($MEDULAreceteTarihi, XSD_STRING, null, "", 'receteTarihi'); $ereceteDVO[] = new SoapVar($MEDULAreceteAltTuru, XSD_INT, null, "", 'receteAltTuru', ''); $ereceteDVO[] = new SoapVar($MEDULAprotokolNo, XSD_STRING, null, "", 'protokolNo'); $ereceteDVO[] = new SoapVar($MEDULAdoktorTcKimlikNo, XSD_STRING, null, "", 'doktorTcKimlikNo'); $ereceteDVO[] = new SoapVar($MEDULAdoktorBransKodu, XSD_INT, null, "", 'doktorBransKodu', ''); $ereceteDVO[] = new SoapVar($MEDULAdoktorSertifikaKodu, XSD_INT, null, "", 'doktorSertifikaKodu', ''); $EreceteTaniDVO = []; $EreceteTaniDVO[] = new SoapVar($MEDULAtaniKodu, XSD_STRING, null, "", 'taniKodu'); $EreceteTaniDVO[] = new SoapVar($MEDULAtaniAdi, XSD_STRING, null, "", 'taniAdi'); $EreceteIlacDVO = []; $EreceteIlacDVO[] = new SoapVar($MEDULAbarkod, XSD_STRING, null, "", 'barkod'); $EreceteIlacDVO[] = new SoapVar($MEDULAadet, XSD_INT, null, "", 'adet', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimSekli, XSD_INT, null, "", 'kullanimSekli', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimDoz1, XSD_INT, null, "", 'kullanimDoz1', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimDoz2, XSD_INT, null, "", 'kullanimDoz2', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimPeriyot, XSD_INT, null, "", 'kullanimPeriyot', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAkullanimPeriyotBirimi, XSD_INT, null, "", 'kullanimPeriyotBirimi', ''); $EreceteIlacDVO[] = new SoapVar($MEDULAgeriOdemeKapsaminda, XSD_STRING, null, "", 'geriOdemeKapsaminda'); $EreceteIlacAciklamaDVO = []; $EreceteIlacAciklamaDVO[] = new SoapVar($MEDULAilacAciklamaTuru, XSD_INT, null, "", 'aciklamaTuru', ''); $EreceteIlacAciklamaDVO[] = new SoapVar($MEDULAilacAciklama, XSD_STRING, null, "", 'aciklama'); $EreceteGirisIstekDVO = [ 'arg0' => new SoapVar($ereceteDVO, SOAP_ENC_OBJECT), 'arg1' => new SoapVar($EreceteTaniDVO, SOAP_ENC_OBJECT), 'arg2' => new SoapVar($EreceteIlacDVO, SOAP_ENC_OBJECT), 'arg3' => new SoapVar($EreceteIlacAciklamaDVO, SOAP_ENC_OBJECT) ]; $results = $client->ereceteGiris($EreceteGirisIstekDVO); print_r($results); } catch (SoapFault $e) { die('ERR: ' . $e->getMessage()); } } } - 03-01-2018, 17:48:06https://sgkt.sgk.gov.tr/medula/eczan...d-dfebe6de09c6
bu linkte şeması mevcut, alması gereken tüm parametreler verdigim linkte belirtilmiş. senin kodlarında arg0 arg1 arg2 ... diye parametreler var fakat şemada böyle bir parametre istemiyor.
arg0 içinde ereceteDVO parametresini vermen gerekiyor. tabi ereceteDVO altındada yine yeni parametreler istemekte, verdigim linkteki şema üzerinden daha kolay ilerleyebilirsin.