public NicuAddmission GetPatientInformationBySl(string selectId)
        {
            DataTable      table   = new NICUDischargeReqGateWay().GetNICUPatientInformationBySl(selectId);
            NicuAddmission patient = new NicuAddmission();

            if (table.Rows.Count > 0)
            {
                patient.PatientName     = table.Rows[0]["PatientName"].ToString();
                patient.Address         = table.Rows[0]["Address"].ToString();
                patient.Age             = table.Rows[0]["Age"].ToString();
                patient.BabysBloodGroup = table.Rows[0]["BabysBloodGroup"].ToString();
                //string docId = table.Rows[0]["Doctor"].ToString();
                //Doctor doctor = new MedicalManager().GetAllDoctorbyId(docId);
                //patient.RefferedInfo = doctor.DoctorName;
                patient.Sex       = table.Rows[0]["Sex"].ToString();
                patient.ContactNo = table.Rows[0]["ContactNo"].ToString();
                //patient.Na = table.Rows[0]["Nationality"].ToString();
                //patient.Phone = table.Rows[0]["Phone"].ToString();
                patient.FatherName = table.Rows[0]["FatherName"].ToString();
                patient.MotherName = table.Rows[0]["MotherName"].ToString();
                //patient.Gender = table.Rows[0]["Gender"].ToString();
                //patient. = table.Rows[0]["Relation"].ToString();
                //patient.Gurdian = table.Rows[0]["Gurdian"].ToString();
                patient.Bed         = table.Rows[0]["BedName"].ToString();
                patient.AdmitDate   = Convert.ToDateTime(table.Rows[0]["AdmitDate"]).Date;
                patient.RegNo       = table.Rows[0]["RegNo"].ToString();
                patient.BirthWeight = table.Rows[0]["BirthWeight"].ToString();
                //patient.SelectedBed = table.Rows[0]["BedName"].ToString();
                patient.RegNo = selectId;
            }
            return(patient);
        }
        public int DeleteNicuPatient(NicuAddmission aNicuAddmission)
        {
            Query   = "DELETE FROM nicuadmission WHERE Id = '" + aNicuAddmission.Id + "'";
            Command = new SqlCommand(Query, Connection);
            int rowAffect = Command.ExecuteNonQuery();

            return(rowAffect);
        }
        private void btnDelete_Click(object sender, EventArgs e)
        {
            DialogResult dr = MetroFramework.MetroMessageBox.Show(this, "Do you want to delete this information?", "Confirmation Message", MessageBoxButtons.YesNo, MessageBoxIcon.Stop);

            if (dr == DialogResult.Yes)
            {
                NicuAddmission aNicuAddmission = new NicuAddmission();
                aNicuAddmission.Id = Convert.ToInt32(lblId.Text);
                MessageModel aMessageModel = new NicuAdmissionManager().DeleteNicuPatient(aNicuAddmission);
                MessageBox.Show(aMessageModel.MessageTitle, aMessageModel.MessageBody, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Clear();
            }
        }
        public MessageModel SaveNicuAdmission(NicuAddmission aNicuAddmission, string actionType, Service service)
        {
            aMessageModel        = new MessageModel();
            aNicuAdmissionGatway = new NicuAdmissionGatway();
            int saveCount = aNicuAdmissionGatway.SaveNicuAdmission(aNicuAddmission, actionType, service);

            if (saveCount > 0)
            {
                aMessageModel.MessageTitle = "Successfull";
                aMessageModel.MessageBody  = "Nicu Admission Saved Successfull";
            }
            return(aMessageModel);
        }
        public MessageModel DeleteNicuPatient(NicuAddmission aNicuAddmission)
        {
            MessageModel aMessageModel = new MessageModel();

            int rowCount = new NicuAdmissionGatway().DeleteNicuPatient(aNicuAddmission);

            if (rowCount > 0)
            {
                aMessageModel.MessageTitle = "Successfull";
                aMessageModel.MessageBody  = "Your data successfully deleted.";
                return(aMessageModel);
            }
            else
            {
                aMessageModel.MessageTitle = "Warning!";
                aMessageModel.MessageBody  = "Your data delete to faild.";
            }
            return(aMessageModel);
        }
Esempio n. 6
0
        public NicuAddmission GetNICUPatientInfo(string pid)
        {
            DataTable      ListofNICUPatient = new NICUBillGateway().GetNICUPatientByID(pid);
            NicuAddmission setup             = new NicuAddmission();

            if (ListofNICUPatient.Rows.Count > 0)
            {
                setup.RegNo           = ListofNICUPatient.Rows[0]["RegNo"].ToString();
                setup.Age             = ListofNICUPatient.Rows[0]["Age"].ToString();
                setup.FatherName      = ListofNICUPatient.Rows[0]["FatherName"].ToString();
                setup.MotherName      = ListofNICUPatient.Rows[0]["MotherName"].ToString();
                setup.AdmitDate       = Convert.ToDateTime(ListofNICUPatient.Rows[0]["AdmitDate"].ToString());
                setup.Address         = ListofNICUPatient.Rows[0]["Address"].ToString();
                setup.Bed             = ListofNICUPatient.Rows[0]["BedName"].ToString();
                setup.BabysBloodGroup = ListofNICUPatient.Rows[0]["BabysBloodGroup"].ToString();
                setup.ContactNo       = ListofNICUPatient.Rows[0]["ContactNo"].ToString();
                setup.Sex             = ListofNICUPatient.Rows[0]["Sex"].ToString();
            }
            return(setup);
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            NicuAddmission aNicuAddmission = new NicuAddmission();

            aNicuAddmission.Id    = Convert.ToInt32(lblId.Text);
            aNicuAddmission.RegNo = txtRegNo.Text;
            string dateString = dateDischargeDate.Value.Date.ToString("yyyy MMMM dd");

            aNicuAddmission.DateofDischarge = Convert.ToDateTime(dateString);

            aNicuAddmission.AdmitDate = dateAdmitDate.Value;

            DateTimeOffset thisDate2 = new DateTimeOffset(dateAdmitTime.Value);

            aNicuAddmission.AdmitTime = thisDate2;

            aNicuAddmission.DateOfBirth     = dateDateOfBirth.Value;
            aNicuAddmission.Age             = txtAge.Text;
            aNicuAddmission.BabysBloodGroup = txtBabyBloodGroup.Text;
            aNicuAddmission.Sex             = txtSex.Text;
            aNicuAddmission.MotherName      = txtMothersName.Text;
            aNicuAddmission.FatherName      = txtFathersName.Text;
            aNicuAddmission.MotherAge       = txtMothersAge.Text;
            aNicuAddmission.FatherAge       = txtFathersAge.Text;
            aNicuAddmission.ContactNo       = txtContactNo.Text;

            aNicuAddmission.FatherOccupation    = txtFathersOccupation.Text;
            aNicuAddmission.MotherOccupation    = txtMothersOccupation.Text;
            aNicuAddmission.Address             = txtAddress.Text;
            aNicuAddmission.RefferedInfo        = txtRefferedInfo.SelectedValue.ToString();
            aNicuAddmission.Remarks             = txtRemarks.Text;
            aNicuAddmission.ComplaintsOne       = txtComplaintsOne.Text;
            aNicuAddmission.ComplaintsTwo       = txtComplaintsTwo.Text;
            aNicuAddmission.ComplaintsThree     = txtComplaintsThree.Text;
            aNicuAddmission.ComplaintsFour      = txtComplaintsFour.Text;
            aNicuAddmission.ComplaintsFive      = txtComplaintsFive.Text;
            aNicuAddmission.MaternalHistory     = txtMaternalHistory.Text;
            aNicuAddmission.LSCS                = checkLSCS.Checked ? "1" : "0";
            aNicuAddmission.BadObstetricHistory = checkBadObstetricHistory.Checked ? "1" : "0";
            aNicuAddmission.Intrapartum         = cmbIntrapartum.Text;
            aNicuAddmission.DeliveryPlace       = cmbDeliveryPlace.Text;
            aNicuAddmission.Conduction          = cmbConduction.Text;
            aNicuAddmission.AntenatalMode       = cmbAntenatalMode.Text;
            aNicuAddmission.ColorOfLiqouo       = cmbColorOfLiqouo.Text;
            aNicuAddmission.Drugs               = cmbDrugs.Text;
            aNicuAddmission.MothersBloodGroup   = cmbMothersBloodGroup.Text;
            aNicuAddmission.MeconiumPassed      = checkMeconiumPassed.Checked ? "1" : "0";

            DateTime meconiumPassedTime    = dateMeconiumPassedTime.Value;
            TimeSpan meconiumPassedTimeSet = new TimeSpan(meconiumPassedTime.Hour, meconiumPassedTime.Minute, meconiumPassedTime.Second);

            aNicuAddmission.MeconiumPassedTime = meconiumPassedTimeSet;


            aNicuAddmission.UrinePassed = checkUrinePassed.Checked ? "1" : "0";

            DateTime urinePassedTime    = dateUrinePassedTime.Value;
            TimeSpan urinePassedTimeSet = new TimeSpan(urinePassedTime.Hour, urinePassedTime.Minute, urinePassedTime.Second);

            aNicuAddmission.UrinePassedTime = urinePassedTimeSet;

            aNicuAddmission.Breathing            = cmbBreathing.Text;
            aNicuAddmission.Resuscitaion         = checkResuscitaion.Checked ? "1" : "0";
            aNicuAddmission.ResuscitaionMinute   = txtResuscitaionMinute.Text;
            aNicuAddmission.DelayedCrying        = checkDelayedCrying.Checked ? "1" : "0";
            aNicuAddmission.NeonatalMods         = cmbNeonatalMods.Text;
            aNicuAddmission.Medications          = cmbMedications.Text;
            aNicuAddmission.MedicationInjParcent = txtMedicationInjParcent.Text;
            aNicuAddmission.BirthWeight          = txtBirthWeight.Text;
            aNicuAddmission.Length               = txtLength.Text;
            aNicuAddmission.Ofc                  = txtOfc.Text;
            aNicuAddmission.ApgerScoresAtOne     = txtApgerScoresAtOne.Text;
            aNicuAddmission.ApgerScoresAtFive    = txtApgerScoresAtFive.Text;
            aNicuAddmission.ApgerScoresAtTen     = txtApgerScoresAtTen.Text;
            aNicuAddmission.Feeding              = checkFeeding.Checked ? "1" : "0";
            aNicuAddmission.FeedingType          = cmbFeedingType.Text;
            aNicuAddmission.Activity             = txtActivity.Text;
            aNicuAddmission.Posture              = txtPosture.Text;
            aNicuAddmission.Cry                  = txtCry.Text;
            aNicuAddmission.Temp                 = txtTemp.Text;
            aNicuAddmission.Skin                 = cmbSkin.Text;
            aNicuAddmission.RashSec              = txtRashSec.Text;
            aNicuAddmission.HeadNeck             = cmbHeadNeck.Text;
            aNicuAddmission.SternoMastoidTumor   = txtSternoMastoidTumor.Text;
            aNicuAddmission.AnteriorSize         = txtAnteriorSize.Text;
            aNicuAddmission.Tension              = txtTension.Text;
            aNicuAddmission.PosteriorSize        = txtPosteriorSize.Text;
            aNicuAddmission.Face                 = cmbFace.Text;
            aNicuAddmission.HeartSound           = txtHeartSound.Text;
            aNicuAddmission.RadioFemoralDelay    = txtRadioFemoralDelay.Text;
            aNicuAddmission.Murmur               = txtMurmur.Text;
            aNicuAddmission.Chest                = cmbChest.Text;
            aNicuAddmission.RrMin                = txtRRMin.Text;
            aNicuAddmission.BreathSound          = txtBreathSound.Text;
            aNicuAddmission.AddedSound           = txtAddedSound.Text;
            aNicuAddmission.HeartRate            = txtHeartRate.Text;
            aNicuAddmission.Shape                = checkShape.Checked ? "1" : "0";
            aNicuAddmission.Distended            = checkDistended.Checked ? "1" : "0";
            aNicuAddmission.Liver                = txtLiver.Text;
            aNicuAddmission.Sleen                = txtSleen.Text;
            aNicuAddmission.Kidney               = txtKidney.Text;
            aNicuAddmission.Umbilicus            = txtUmbilicus.Text;
            aNicuAddmission.Scrotum              = txtScrotum.Text;
            aNicuAddmission.Penis                = txtPenis.Text;
            aNicuAddmission.Testis               = cmbTestis.Text;
            aNicuAddmission.LabiaMajora          = txtLabiaMajora.Text;
            aNicuAddmission.Minora               = txtMinora.Text;
            aNicuAddmission.Clitromegaly         = txtClitromegaly.Text;
            aNicuAddmission.Anus                 = cmbAnus.Text;
            aNicuAddmission.BackSpine            = cmbBackSpine.Text;
            aNicuAddmission.FootHand             = cmbFootHand.Text;
            aNicuAddmission.CNS                  = cmbCNS.Text;
            aNicuAddmission.JitterinessTone      = cmbJitterinessTone.Text;
            aNicuAddmission.Moro                 = txtMoro.Text;
            aNicuAddmission.Rooting              = txtRooting.Text;
            aNicuAddmission.Sucking              = txtSucking.Text;
            aNicuAddmission.Fractures            = txtFractures.Text;
            aNicuAddmission.NerveInjury          = txtNerveInjury.Text;
            aNicuAddmission.SoftIssue            = txtSoftIssue.Text;
            aNicuAddmission.Category             = cmbCategory.Text;
            aNicuAddmission.GestationalAge       = txtGestationalAge.Text;
            aNicuAddmission.CongenitalAnomalies  = txtCongenitalAnomalies.Text;
            aNicuAddmission.ProvisionalDiagnosis = txtProvisionalDiagnosis.Text;
            aNicuAddmission.SalientFeature       = txtSalientFeature.Text;
            aNicuAddmission.FinalDiagnosis       = txtFinalDiagnosis.Text;

            if (cmbBed.Tag != null)
            {
                aNicuAddmission.Bed = cmbBed.Tag.ToString();
            }
            //New Added start
            Service aService = new Service();

            aService.OPID      = txtRegNo.Text;
            aService.ServiceId = "N-Serv-02";

            aService.Rate  = Convert.ToDouble(txtAdmissionFee.Text);
            aService.Total = Convert.ToDouble(txtAdmissionFee.Text);

            aService.Qty       = 1;
            aService.IssueDate = dateAdmitDate.Value;

            //New Added End

            string actionType = btnSave.Text;

            NicuAdmissionManager aNicuAdmissionManager = new NicuAdmissionManager();

            MessageModel aMessageModel = new MessageModel();

            aMessageModel = aNicuAdmissionManager.SaveNicuAdmission(aNicuAddmission, actionType, aService);

            if (aMessageModel.MessageTitle == "Successfull")
            {
                MessageBox.Show(aMessageModel.MessageBody, aMessageModel.MessageTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Clear();
            }
        }
        public int SaveNicuAdmission(NicuAddmission aNicuAddmission, string actionType, Service service)
        {
            if (actionType == "Save")
            {
                Query = "INSERT INTO NicuAdmission(RegNo,DateofDischarge,AdmitDate,AdmitTime,DateOfBirth,Age,BabysBloodGroup,Sex," +
                        "MotherName,FatherName,ContactNo,MotherAge,FatherAge,FatherOccupation,MotherOccupation,Address," +
                        "RefferedInfo,Remarks,ComplaintsOne,ComplaintsTwo,ComplaintsThree,ComplaintsFour,ComplaintsFive," +
                        "MaternalHistory,LSCS,BadObstetricHistory,Intrapartum,DeliveryPlace,Conduction,AntenatalMode," +
                        "ColorOfLiqouo,Drugs,MothersBloodGroup,MeconiumPassed,MeconiumPassedTime,UrinePassed,UrinePassedTime," +
                        "Breathing,Resuscitaion,ResuscitaionMinute,DelayedCrying,NeonatalMods,Medications,MedicationInjParcent," +
                        "BirthWeight,Length,Ofc,ApgerScoresAtOne,ApgerScoresAtFive,ApgerScoresAtTen,Feeding,FeedingType,Activity," +
                        "Posture,Cry,Temp,Skin,RashSec,HeadNeck,SternoMastoidTumor,AnteriorSize,Tension,PosteriorSize,Face,HeartSound," +
                        "RadioFemoralDelay,Murmur,Chest,RRMin,BreathSound,AddedSound,HeartRate,Shape,Distended,Liver,Sleen,Kidney," +
                        "Umbilicus,Scrotum,Penis,Testis,LabiaMajora,Minora,Clitromegaly,Anus,BackSpine,FootHand,CNS,JitterinessTone," +
                        "Moro,Rooting,Sucking,Fractures,NerveInjury,SoftIssue,Category,GestationalAge,CongenitalAnomalies," +
                        "ProvisionalDiagnosis,SalientFeature,FinalDiagnosis,Bed)" +
                        "VALUES(@RegNo,@DateofDischarge,@AdmitDate,@AdmitTime,@DateOfBirth,@Age,@BabysBloodGroup,@Sex,@MotherName," +
                        "@FatherName,@ContactNo,@MotherAge,@FatherAge,@FatherOccupation,@MotherOccupation,@Address,@RefferedInfo," +
                        "@Remarks,@ComplaintsOne,@ComplaintsTwo,@ComplaintsThree,@ComplaintsFour,@ComplaintsFive,@MaternalHistory," +
                        "@LSCS,@BadObstetricHistory,@Intrapartum,@DeliveryPlace,@Conduction,@AntenatalMode,@ColorOfLiqouo,@Drugs," +
                        "@MothersBloodGroup,@MeconiumPassed,@MeconiumPassedTime,@UrinePassed,@UrinePassedTime,@Breathing," +
                        "@Resuscitaion,@ResuscitaionMinute,@DelayedCrying,@NeonatalMods,@Medications,@MedicationInjParcent," +
                        "@BirthWeight,@Length,@Ofc,@ApgerScoresAtOne,@ApgerScoresAtFive,@ApgerScoresAtTen,@Feeding,@FeedingType," +
                        "@Activity,@Posture,@Cry,@Temp,@Skin,@RashSec,@HeadNeck,@SternoMastoidTumor,@AnteriorSize,@Tension," +
                        "@PosteriorSize,@Face,@HeartSound,@RadioFemoralDelay,@Murmur,@Chest,@RRMin,@BreathSound,@AddedSound," +
                        "@HeartRate,@Shape,@Distended,@Liver,@Sleen,@Kidney,@Umbilicus,@Scrotum,@Penis,@Testis,@LabiaMajora,@Minora," +
                        "@Clitromegaly,@Anus,@BackSpine,@FootHand,@CNS,@JitterinessTone,@Moro,@Rooting,@Sucking,@Fractures," +
                        "@NerveInjury,@SoftIssue,@Category,@GestationalAge,@CongenitalAnomalies,@ProvisionalDiagnosis,@SalientFeature," +
                        "@FinalDiagnosis,@Bed)";
            }
            else if (actionType == "Edit")
            {
                Query = "UPDATE NicuAdmission SET RegNo=@RegNo,DateofDischarge=@DateofDischarge,AdmitDate=@AdmitDate," +
                        "AdmitTime=@AdmitTime,DateOfBirth=@DateOfBirth,Age=@Age, BabysBloodGroup=@BabysBloodGroup,Sex=@Sex," +
                        "MotherName=@MotherName,FatherName=@FatherName,ContactNo=@ContactNo,MotherAge=@MotherAge,FatherAge=@FatherAge," +
                        "FatherOccupation=@FatherOccupation, MotherOccupation = @MotherOccupation,Address=@Address," +
                        "RefferedInfo=@RefferedInfo,Remarks=@Remarks,ComplaintsOne=@ComplaintsOne,ComplaintsTwo=@ComplaintsTwo," +
                        "ComplaintsThree=@ComplaintsThree,ComplaintsFour=@ComplaintsFour,ComplaintsFive=@ComplaintsFive," +
                        "MaternalHistory=@MaternalHistory,LSCS=@LSCS,BadObstetricHistory=@BadObstetricHistory," +
                        "Intrapartum=@Intrapartum,DeliveryPlace=@DeliveryPlace,Conduction=@Conduction,AntenatalMode=@AntenatalMode," +
                        "ColorOfLiqouo=@ColorOfLiqouo,Drugs=@Drugs,MothersBloodGroup=@MothersBloodGroup,MeconiumPassed=@MeconiumPassed," +
                        "MeconiumPassedTime=@MeconiumPassedTime,UrinePassed=@UrinePassed,UrinePassedTime=@UrinePassedTime," +
                        "Breathing=@Breathing,Resuscitaion=@Resuscitaion, ResuscitaionMinute=@ResuscitaionMinute," +
                        "DelayedCrying=@DelayedCrying,NeonatalMods=@NeonatalMods,Medications=@Medications," +
                        "MedicationInjParcent =@MedicationInjParcent,BirthWeight=@BirthWeight,Length=@Length,Ofc=@Ofc," +
                        "ApgerScoresAtOne=@ApgerScoresAtOne,ApgerScoresAtFive=@ApgerScoresAtFive,ApgerScoresAtTen=@ApgerScoresAtTen," +
                        "Feeding=@Feeding,FeedingType=@FeedingType,Activity=@Activity,Posture=@Posture,Cry=@Cry,Temp=@Temp,Skin=@Skin," +
                        "RashSec=@RashSec,HeadNeck=@HeadNeck,SternoMastoidTumor=@SternoMastoidTumor,AnteriorSize=@AnteriorSize," +
                        "Tension=@Tension,PosteriorSize=@PosteriorSize,Face=@Face,HeartSound=@HeartSound,RadioFemoralDelay=@RadioFemoralDelay," +
                        "Murmur=@Murmur,Chest=@Chest,RRMin=@RRMin,BreathSound=@BreathSound,AddedSound=@AddedSound,HeartRate=@HeartRate," +
                        "Shape=@Shape,Distended=@Distended,Liver=@Liver,Sleen=@Sleen,Kidney=@Kidney,Umbilicus=@Umbilicus," +
                        "Scrotum=@Scrotum,Penis=@Penis,Testis=@Testis,LabiaMajora=@LabiaMajora,Minora=@Minora," +
                        "Clitromegaly=@Clitromegaly,Anus=@Anus,BackSpine=@BackSpine,FootHand=@FootHand,CNS=@CNS," +
                        "JitterinessTone=@JitterinessTone,Moro=@Moro,Rooting=@Rooting,Sucking=@Sucking,Fractures=@Fractures," +
                        "NerveInjury=@NerveInjury,SoftIssue=@SoftIssue,Category=@Category,GestationalAge=@GestationalAge," +
                        "CongenitalAnomalies=@CongenitalAnomalies,ProvisionalDiagnosis=@ProvisionalDiagnosis," +
                        "SalientFeature=@SalientFeature,FinalDiagnosis=@FinalDiagnosis,Bed=@Bed WHERE Id='" + aNicuAddmission.Id + "'";
            }

            Command             = new SqlCommand(Query, Connection);
            Command.CommandType = CommandType.Text;
            Command.Parameters.AddWithValue("@RegNo", aNicuAddmission.RegNo ?? "");
            Command.Parameters.AddWithValue("@DateofDischarge", aNicuAddmission.DateofDischarge);
            Command.Parameters.AddWithValue("@AdmitDate", aNicuAddmission.AdmitDate);
            Command.Parameters.AddWithValue("@AdmitTime", aNicuAddmission.AdmitTime);
            Command.Parameters.AddWithValue("@DateOfBirth", aNicuAddmission.DateOfBirth);
            Command.Parameters.AddWithValue("@Age", aNicuAddmission.Age ?? "");
            Command.Parameters.AddWithValue("@BabysBloodGroup", aNicuAddmission.BabysBloodGroup ?? "");
            Command.Parameters.AddWithValue("@Sex", aNicuAddmission.Sex ?? "");
            Command.Parameters.AddWithValue("@MotherName", aNicuAddmission.MotherName ?? "");
            Command.Parameters.AddWithValue("@FatherName", aNicuAddmission.FatherName ?? "");
            Command.Parameters.AddWithValue("@ContactNo", aNicuAddmission.ContactNo ?? "");
            Command.Parameters.AddWithValue("@MotherAge", aNicuAddmission.MotherAge ?? "");
            Command.Parameters.AddWithValue("@FatherAge", aNicuAddmission.FatherAge ?? "");
            Command.Parameters.AddWithValue("@FatherOccupation", aNicuAddmission.FatherOccupation ?? "");
            Command.Parameters.AddWithValue("@MotherOccupation", aNicuAddmission.MotherOccupation ?? "");
            Command.Parameters.AddWithValue("@Address", aNicuAddmission.Address ?? "");
            Command.Parameters.AddWithValue("@RefferedInfo", aNicuAddmission.RefferedInfo ?? "");
            Command.Parameters.AddWithValue("@Remarks", aNicuAddmission.Remarks ?? "");
            Command.Parameters.AddWithValue("@ComplaintsOne", aNicuAddmission.ComplaintsOne ?? "");
            Command.Parameters.AddWithValue("@ComplaintsTwo", aNicuAddmission.ComplaintsTwo ?? "");
            Command.Parameters.AddWithValue("@ComplaintsThree", aNicuAddmission.ComplaintsThree ?? "");
            Command.Parameters.AddWithValue("@ComplaintsFour", aNicuAddmission.ComplaintsFour ?? "");
            Command.Parameters.AddWithValue("@ComplaintsFive", aNicuAddmission.ComplaintsFive ?? "");
            Command.Parameters.AddWithValue("@MaternalHistory", aNicuAddmission.MaternalHistory ?? "");
            Command.Parameters.AddWithValue("@LSCS", aNicuAddmission.LSCS ?? "");
            Command.Parameters.AddWithValue("@BadObstetricHistory", aNicuAddmission.BadObstetricHistory ?? "");
            Command.Parameters.AddWithValue("@Intrapartum", aNicuAddmission.Intrapartum ?? "");
            Command.Parameters.AddWithValue("@DeliveryPlace", aNicuAddmission.DeliveryPlace ?? "");
            Command.Parameters.AddWithValue("@Conduction", aNicuAddmission.Conduction ?? "");
            Command.Parameters.AddWithValue("@AntenatalMode", aNicuAddmission.AntenatalMode ?? "");
            Command.Parameters.AddWithValue("@ColorOfLiqouo", aNicuAddmission.ColorOfLiqouo ?? "");
            Command.Parameters.AddWithValue("@Drugs", aNicuAddmission.Drugs ?? "");
            Command.Parameters.AddWithValue("@MothersBloodGroup", aNicuAddmission.MothersBloodGroup ?? "");
            Command.Parameters.AddWithValue("@MeconiumPassed", aNicuAddmission.MeconiumPassed ?? "");
            Command.Parameters.AddWithValue("@MeconiumPassedTime", aNicuAddmission.MeconiumPassedTime);
            Command.Parameters.AddWithValue("@UrinePassed", aNicuAddmission.UrinePassed ?? "");
            Command.Parameters.AddWithValue("@UrinePassedTime", aNicuAddmission.UrinePassedTime);
            Command.Parameters.AddWithValue("@Breathing", aNicuAddmission.Breathing ?? "");
            Command.Parameters.AddWithValue("@Resuscitaion", aNicuAddmission.Resuscitaion ?? "");
            Command.Parameters.AddWithValue("@ResuscitaionMinute", aNicuAddmission.ResuscitaionMinute ?? "");
            Command.Parameters.AddWithValue("@DelayedCrying", aNicuAddmission.DelayedCrying ?? "");
            Command.Parameters.AddWithValue("@NeonatalMods", aNicuAddmission.NeonatalMods ?? "");
            Command.Parameters.AddWithValue("@Medications", aNicuAddmission.Medications ?? "");
            Command.Parameters.AddWithValue("@MedicationInjParcent", aNicuAddmission.MedicationInjParcent ?? "");
            Command.Parameters.AddWithValue("@BirthWeight", aNicuAddmission.BirthWeight ?? "");
            Command.Parameters.AddWithValue("@Length", aNicuAddmission.Length ?? "");
            Command.Parameters.AddWithValue("@Ofc", aNicuAddmission.Ofc ?? "");
            Command.Parameters.AddWithValue("@ApgerScoresAtOne", aNicuAddmission.ApgerScoresAtOne ?? "");
            Command.Parameters.AddWithValue("@ApgerScoresAtFive", aNicuAddmission.ApgerScoresAtFive ?? "");
            Command.Parameters.AddWithValue("@ApgerScoresAtTen", aNicuAddmission.ApgerScoresAtTen ?? "");
            Command.Parameters.AddWithValue("@Feeding", aNicuAddmission.Feeding ?? "");
            Command.Parameters.AddWithValue("@FeedingType", aNicuAddmission.FeedingType ?? "");
            Command.Parameters.AddWithValue("@Activity", aNicuAddmission.Activity ?? "");
            Command.Parameters.AddWithValue("@Posture", aNicuAddmission.Posture ?? "");
            Command.Parameters.AddWithValue("@Cry", aNicuAddmission.Cry ?? "");
            Command.Parameters.AddWithValue("@Temp", aNicuAddmission.Temp ?? "");
            Command.Parameters.AddWithValue("@Skin", aNicuAddmission.Skin ?? "");
            Command.Parameters.AddWithValue("@RashSec", aNicuAddmission.RashSec ?? "");
            Command.Parameters.AddWithValue("@HeadNeck", aNicuAddmission.HeadNeck ?? "");
            Command.Parameters.AddWithValue("@SternoMastoidTumor", aNicuAddmission.SternoMastoidTumor ?? "");
            Command.Parameters.AddWithValue("@AnteriorSize", aNicuAddmission.AnteriorSize ?? "");
            Command.Parameters.AddWithValue("@Tension", aNicuAddmission.Tension ?? "");
            Command.Parameters.AddWithValue("@PosteriorSize", aNicuAddmission.PosteriorSize ?? "");
            Command.Parameters.AddWithValue("@Face", aNicuAddmission.Face ?? "");
            Command.Parameters.AddWithValue("@HeartSound", aNicuAddmission.HeartSound ?? "");
            Command.Parameters.AddWithValue("@RadioFemoralDelay", aNicuAddmission.RadioFemoralDelay ?? "");
            Command.Parameters.AddWithValue("@Murmur", aNicuAddmission.Murmur ?? "");
            Command.Parameters.AddWithValue("@Chest", aNicuAddmission.Chest ?? "");
            Command.Parameters.AddWithValue("@RRMin", aNicuAddmission.RrMin ?? "");
            Command.Parameters.AddWithValue("@BreathSound", aNicuAddmission.BreathSound ?? "");
            Command.Parameters.AddWithValue("@AddedSound", aNicuAddmission.AddedSound ?? "");
            Command.Parameters.AddWithValue("@HeartRate", aNicuAddmission.HeartRate ?? "");
            Command.Parameters.AddWithValue("@Shape", aNicuAddmission.Shape ?? "");
            Command.Parameters.AddWithValue("@Distended", aNicuAddmission.Distended ?? "");
            Command.Parameters.AddWithValue("@Liver", aNicuAddmission.Liver ?? "");
            Command.Parameters.AddWithValue("@Sleen", aNicuAddmission.Sleen ?? "");
            Command.Parameters.AddWithValue("@Kidney", aNicuAddmission.Kidney ?? "");
            Command.Parameters.AddWithValue("@Umbilicus", aNicuAddmission.Umbilicus ?? "");
            Command.Parameters.AddWithValue("@Scrotum", aNicuAddmission.Scrotum ?? "");
            Command.Parameters.AddWithValue("@Penis", aNicuAddmission.Penis ?? "");
            Command.Parameters.AddWithValue("@Testis", aNicuAddmission.Testis ?? "");
            Command.Parameters.AddWithValue("@LabiaMajora", aNicuAddmission.LabiaMajora ?? "");
            Command.Parameters.AddWithValue("@Minora", aNicuAddmission.Minora ?? "");
            Command.Parameters.AddWithValue("@Clitromegaly", aNicuAddmission.Clitromegaly ?? "");
            Command.Parameters.AddWithValue("@Anus", aNicuAddmission.Anus ?? "");
            Command.Parameters.AddWithValue("@BackSpine", aNicuAddmission.BackSpine ?? "");
            Command.Parameters.AddWithValue("@FootHand", aNicuAddmission.FootHand ?? "");
            Command.Parameters.AddWithValue("@CNS", aNicuAddmission.CNS ?? "");
            Command.Parameters.AddWithValue("@JitterinessTone", aNicuAddmission.JitterinessTone ?? "");
            Command.Parameters.AddWithValue("@Moro", aNicuAddmission.Moro ?? "");
            Command.Parameters.AddWithValue("@Rooting", aNicuAddmission.Rooting ?? "");
            Command.Parameters.AddWithValue("@Sucking", aNicuAddmission.Sucking ?? "");
            Command.Parameters.AddWithValue("@Fractures", aNicuAddmission.Fractures ?? "");
            Command.Parameters.AddWithValue("@NerveInjury", aNicuAddmission.NerveInjury ?? "");
            Command.Parameters.AddWithValue("@SoftIssue", aNicuAddmission.SoftIssue ?? "");
            Command.Parameters.AddWithValue("@Category", aNicuAddmission.Category ?? "");
            Command.Parameters.AddWithValue("@GestationalAge", aNicuAddmission.GestationalAge ?? "");
            Command.Parameters.AddWithValue("@CongenitalAnomalies", aNicuAddmission.CongenitalAnomalies ?? "");
            Command.Parameters.AddWithValue("@ProvisionalDiagnosis", aNicuAddmission.ProvisionalDiagnosis ?? "");
            Command.Parameters.AddWithValue("@SalientFeature", aNicuAddmission.SalientFeature ?? "");
            Command.Parameters.AddWithValue("@FinalDiagnosis", aNicuAddmission.FinalDiagnosis ?? "");
            Command.Parameters.AddWithValue("@Bed", aNicuAddmission.Bed ?? "");



            int count = Command.ExecuteNonQuery();

            if (count > 0 && actionType == "Edit")
            {
                DeleteNicuRegNoTblPatientServiceBill(service);
                SaveNicuService(service);
                count++;
            }
            else if (actionType == "Save")
            {
                SaveNicuService(service);
                count++;
            }
            return(count);
        }