

SELECT * FROM  `p_feuillemaladie` 
WHERE numeroBeneficiaire='0156188702'


SELECT * FROM beneficiaire WHERE dateSortie IS NOT NULL AND idPolice=156  AND codeLienPArente='C'
AND id IN ( SELECT prt.idBeneficiaire FROM p_prestationactes prt INNER JOIN p_facture B ON (B.id=prt.idfacture)
WHERE (LEFT(B.dateSysteme,10) BETWEEN '2022-01-01' AND '2022-03-31' )
AND B.codePrestataire NOT IN ('CE0416','PR1176','CE1215','CE1232','PR1175')
AND B.idPolice=156   -- and  B.idAdherent in (3043)
)

SELECT id,numeroBeneficiaire,idAdherent,numeroAdherent,idPolice,nomBeneficiaire,prenomsBeneficiaire
FROM beneficiaire
-- WHERE id=0
 -- where idAdherent=3868
WHERE id='12150'



UPDATE   p_prestationactes
SET  idBeneficiaire=12810,numeroBeneficiaire='0156209902',idAdherent=4236,numeroAdherent='01562099' 
WHERE numeroFeuilleMaladie=12924

UPDATE   p_facture
SET  idBeneficiaire=12810,numeroBeneficiaire='0156209902',idAdherent=4236  -- ,idPolice=185
WHERE numeroFeuilleMaladie=12924





----------------



SELECT * FROM   beneficiaire  WHERE id=12150


SELECT * FROM  `p_feuillemaladie`
WHERE numeroBeneficiaire='0156188702'
-- id=7444


SELECT  *
-- numeroFeuilleMaladie,idBeneficiaire ,numeroBeneficiaire ,idAdherent ,numeroAdherent,idFacture
FROM    p_prestationactes
WHERE numeroFeuilleMaladie=8935


-- 8968

SELECT  *
-- id,numeroFeuilleMaladie,idBeneficiaire ,numeroBeneficiaire ,idAdherent  ,idPolice
FROM    p_facture
WHERE id=8861

-- WHERE numeroFeuilleMaladie=8935



SELECT id,numeroBeneficiaire,idAdherent,numeroAdherent,idPolice,nomBeneficiaire,prenomsBeneficiaire
FROM beneficiaire
WHERE id='7050'


SELECT numeroFeuilleMaladie, idBeneficiaire,numeroBeneficiaire,idAdherent,idPolice,id 
FROM  p_facture
WHERE idBeneficiaire=12150


SELECT numeroFeuilleMaladie, idBeneficiaire,numeroBeneficiaire,idAdherent,idFacture
FROM  p_prestationactes
WHERE idBeneficiaire=12150


UPDATE   p_prestationactes
SET  idBeneficiaire=7050,numeroBeneficiaire='0156097801',idAdherent=2856,numeroAdherent='01560978' 
WHERE numeroFeuilleMaladie=19567

UPDATE   p_facture
SET  idBeneficiaire=7050,numeroBeneficiaire='0156097801',idAdherent=2856  ,idPolice=156
WHERE numeroFeuilleMaladie=8935