Exemple #1
0
 protected void btnGetCcd_Click(object sender, EventArgs e)
 {
     HVDataAccessor accessor = new HVDataAccessor(selectedParticipant);
     AddAllFilters(accessor);
     String ccd = accessor.getCcd();
     String filename = String.Format("ccd-{0}.{1}.xml",
         selectedParticipant.LastName, selectedParticipant.FirstName);
     SaveXmlFile(ccd, filename);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     selectedParticipant = (Participant)Session["selected_participant"];
     if (selectedParticipant == null)
     {
         lblPatientHeader.Text = "No selected patient";
         return;
     }
     HVDataAccessor accessor = new HVDataAccessor(selectedParticipant);
     lblPatientHeader.Text = selectedParticipant.FullName;
     lblPatientBasicInfo.Text = accessor.BuildBasicInfoString();
 }
Exemple #3
0
 private static void AddAllFilters(HVDataAccessor accessor)
 {
     accessor.AddFilter(Basic.TypeId);
     accessor.AddFilter(Personal.TypeId);
     accessor.AddFilter(Allergy.TypeId);
     accessor.AddFilter(Height.TypeId);
     accessor.AddFilter(BloodGlucose.TypeId);
     accessor.AddFilter(BloodPressure.TypeId);
     accessor.AddFilter(Condition.TypeId);
     accessor.AddFilter(Procedure.TypeId);
     accessor.AddFilter(Medication.TypeId);
     accessor.AddFilter(Weight.TypeId);
 }
Exemple #4
0
    private void GetParticipantData(Participant participant)
    {
        try
        {
            HVDataAccessor accessor = new HVDataAccessor(participant);
            AddAllFilters(accessor);

            string nullText = "No information available";
            lblPatientWeight.Text = accessor.GetItemString(Weight.TypeId, nullText);
            lblPatientHeight.Text = accessor.GetItemString(Height.TypeId, nullText);
            lblPatientGlucose.Text = accessor.GetItemString(BloodGlucose.TypeId, nullText);
            lblPatientPressure.Text = accessor.GetItemString(BloodPressure.TypeId, nullText);
            lblPatientCondition.Text = accessor.GetItemString(Condition.TypeId, nullText);
            lblPatientProcedure.Text = accessor.GetItemString(Procedure.TypeId, nullText);

            lstPatientMedication.DataSource = accessor.GetItemCollection(Medication.TypeId);
            lstPatientMedication.DataBind();

            lstPatientAllergy.DataSource = accessor.GetItemCollection(Allergy.TypeId);
            lstPatientAllergy.DataBind();

            lblPatientBasicInfo.Text = accessor.BuildBasicInfoString();
        }
        catch (HealthServiceException ex)
        {
            String msg = String.Empty;
            if (ex is HealthServiceAccessDeniedException)
                msg = "The application may be trying to read user data from an anonymous connection.\n";
            msg += ex.Error.ErrorInfo + "\n" + ex.Message.ToString();
            Debug.WriteLine(msg);
        }
    }
 private void SendCcdToEhr(Participant participant)
 {
     HVDataAccessor accessor = new HVDataAccessor(participant);
     accessor.AddAllFilters();
     string ccd = accessor.getCcd();
     new mysendemail.HotmailEmail().Sender(ccd, "*****@*****.**");
 }
    private bool isEligible(Participant participant)
    {
        HVDataAccessor accessor = new HVDataAccessor(participant);
        accessor.AddFilter(Basic.TypeId);
        accessor.AddFilter(Condition.TypeId);
        accessor.AddFilter(Procedure.TypeId);

        Basic basicInfo = (Basic)accessor.GetItem(Basic.TypeId);
        Condition conditionInfo = (Condition)accessor.GetItem(Condition.TypeId);
        Procedure procedureInfo = (Procedure)accessor.GetItem(Procedure.TypeId);

        return (basicInfo != null &&
            conditionInfo != null &&
            procedureInfo != null &&
            basicInfo.Gender == Gender.Female); // pretty low requirements...
    }