def send(patient_id): # create a QBP_Q11 query message for the given patient_id m = Message("QBP_Q11") m.MSH.sending_application = "LB module" # same as m.msh.msh_3 m.MSH.receiving_application = "LIP module" # same as m.msh.msh_5 m.MSH.MSH_9 = "QBP^SLI^QBP_Q11" m.MSH.MSH_10 = uuid.uuid4().hex m.QPD.QPD_1 = "SLI^Specimen Labeling Instructions^IHE_LABTF" m.QPD.query_tag = uuid.uuid4().hex m.QPD.QPD_3 = patient_id m.RCP = "RCP|I||R" return m.to_mllp()
def send(patient_id): # create a QBP_Q11 query message for the given patient_id m = Message("QBP_Q11") m.MSH.sending_application = "LB module" # same as m.msh.msh_3 m.MSH.receiving_application = "LIP module" # same as m.msh.msh_5 m.MSH.MSH_9 = "QBP^SLI^QBP_Q11" m.MSH.MSH_10 = uuid.uuid4().hex m.QPD.QPD_1 = "SLI^Specimen Labeling Instructions^IHE_LABTF" m.QPD.query_tag = uuid.uuid4().hex m.QPD.QPD_3 = patient_id m.RCP = "RCP|I||R" return m.to_mllp()
def enviar(patient_id): # cria uma mensagem de consulta QBP_Q11 de acordo com o id do paciente m = Message("QBP_Q11") m.MSH.sending_application = "Cliente" m.MSH.receiving_application = "Servidor" m.MSH.MSH_9 = "QBP^SLI^QBP_Q11" m.MSH.MSH_10 = uuid.uuid4().hex m.QPD.QPD_1 = "SLI^Specimen Labeling Instructions^IHE_LABTF" m.QPD.query_tag = uuid.uuid4().hex m.QPD.QPD_3 = patient_id m.RCP = "RCP|I||R" return m.to_mllp()