コード例 #1
0
        public static KKP GetDataKKP(int Id)
        {
            KKP KKP = new KKP();

            try
            {
                using (var dc = new PinereDataContext(PinereConstant.PinereConnectionString))
                {
                    KKP = (from a in dc.GetDataKKP(Id)
                           select new KKP
                    {
                        Id = a.Id,
                        PasienId = a.PasienId.Value.ToString(),
                        Suhu = a.Suhu.Value.ToString(),
                        TekananDarah1 = a.Tekanan_Darah1.Value.ToString(),
                        TekananDarah2 = a.Tekanan_Darah2.Value.ToString(),
                        Pernapasan = a.Pernapasan.Value.ToString(),
                        Nadi = a.Nadi.Value.ToString(),
                        TandaGejala = a.Tanda_Gejala,
                        VisitLiberia = a.Visit_Liberia.Value,
                        VisitGuinea = a.Visit_Guinea.Value,
                        VisitSierra = a.Visit_Sierra.Value,
                        VisitMali = a.Visit_Mali.Value,
                        VisitKongo = a.Visit_Kongo.Value,
                        VisitPerancis = a.Visit_Perancis.Value,
                        VisitItalia = a.Visit_Italia.Value,
                        VisitJordania = a.Visit_Jordania.Value,
                        VisitQatar = a.Visit_Qatar.Value,
                        VisitArab = a.Visit_Arab.Value,
                        VisitTunisia = a.Visit_Tunisia.Value,
                        VisitInggris = a.Visit_Inggris.Value,
                        VisitUEA = a.Visit_UEA.Value,
                        VisitOther = a.Visit_Other.Value,
                        VisitOtherText = a.Visit_Other_Text,
                        DurasiStart = GetDateStringFromDate(a.Durasi_Start),
                        DurasiEnd = GetDateStringFromDate(a.Durasi_End),
                        TujuanPerjalanan = a.Tujuan_Perjalanan,
                        TujuanPerjalananOther = a.Tujuan_Perjalanan_Other,
                        RiwayatPaparan = a.Riwayat_Paparan,
                        HasilDiagnosa = a.Hasil_Diagnosa,
                        HasilDiagnosaOther = a.Hasil_Diagnosa_Other,
                        RujukRS = a.Rujuk_RS,
                        IdRS = a.IdRS,
                        NamaRS = a.NamaRS,
                        SuratRujukan = a.Surat_Rujukan,
                        TingkatRisiko = a.Tingkat_Risiko,
                        PemeriksaanFisik = a.Pemeriksaan_fisik,
                        TindakanMedis = a.Tindakan_medis,
                        PemeriksaanLab = a.Pemeriksaan_lab,
                        HasilLab = a.Hasil_pemeriksaan_lab,
                        Pengobatan = a.Pengobatan,
                        KriteriaResiko = a.Kriteria_Resiko,
                        TindakanResiko = a.Tindakan_Resiko
                    }).SingleOrDefault();
                    if (KKP == null)
                    {
                        KKP = new KKP();
                    }
                }
            }
            catch (Exception e)
            {
                throw new Exception(e.Message);
            }
            return(KKP);
        }