-- codeAffection
CALL `recherchecolonne`('codeAffection')


SELECT * FROM p_feuillemaladie
WHERE codeAffection IN ("0000","000","990")
AND dateConsultation>="2022-07-18"



SELECT * FROM prestataire WHERE libelle LIKE "%KOUMA%"

-- CE1479 : LABORATOIRE CENTRE MEDICAL MAIRIE DE KOUMASSI

-- CE1287 : CME MAIRIE DE KOUMASSI

SELECT DISTINCT codePrestataire FROM `p_prestationactes` WHERE codePrestataire IN("CE1479","CE1287")


SELECT * FROM `p_prestationactes` WHERE codePrestataire IN("CE1287") AND codeTypePrestation="EXAM"

SELECT * FROM `p_prestationactes` WHERE codePrestataire IN("CE1479") AND codeTypePrestation="EXAM" AND datePrestation>="2022-01-01"


SELECT f.* FROM `p_prestationactes` p INNER JOIN p_facture f ON(f.id=p.idFacture)
WHERE p.codePrestataire IN("CE1479") AND p.codeTypePrestation="EXAM" AND p.datePrestation>="2022-01-01"


UPDATE p_feuillemaladie
SET codeAffection=990
WHERE codeAffection IN ("0000","000")


-- codeSpecialite
CALL `recherchecolonne`('codeSpecialite')


SELECT * FROM p_medecin
WHERE codeSpecialite NOT IN (SELECT codeSpecialite FROM p_specialite )
AND CodeMetier="INF"



SELECT * FROM p_specialite WHERE libelle LIKE "%op%"   -- 076

UPDATE p_medecin
SET codeSpecialite="076"
WHERE codeSpecialite NOT IN (SELECT codeSpecialite FROM p_specialite )
AND CodeMetier="SAG"



