コード例 #1
0
 public AdeverintaMedicala()
 {
     dateSpital  = new DateSpital("", "", "");
     nrFisa      = 0;
     pacient     = new Pacient();
     afectiune   = "";
     recomandare = "";
     servire     = "";
     data        = new Data(0, 0, 0);
 }
コード例 #2
0
 public AdeverintaMedicala(DateSpital d, int nr, Pacient p, string a, string r, string s, Data d2)
 {
     dateSpital  = d;
     nrFisa      = nr;
     pacient     = p;
     afectiune   = a;
     recomandare = r;
     servire     = s;
     data        = d2;
 }
コード例 #3
0
 public Reteta(DateSpital d, int nr, string gr, Pacient p, string dg, string r, Data dt)
 {
     dateSpital = d;
     nrReteta   = nr;
     gratuit    = gr;
     pacient    = p;
     diagnostic = dg;
     reteta     = r;
     data       = dt;
 }
コード例 #4
0
        public void AlegeTipulDocumentului(string tipDocument, string cnp)
        {
            //date spital
            var        judetSpital      = "judetSpital";
            var        localitateSpital = "localitateSpital";
            var        unitateSanitara  = "unitateSanitara";
            DateSpital dateSpital       = new DateSpital(judetSpital, localitateSpital, unitateSanitara);
            var        nrFisa           = 234;

            DateTime azi          = DateTime.Now;
            Data     dataEiberare = new Data(azi.Day, azi.Month, azi.Year);

            //initializare
            Pacient pacient = new Pacient();

            var cauta = new CautaPacient();
            var gasit = cauta.Cauta(cnp);

            if (gasit == 1)
            {
                // pacientAdeverinta = PacientFactory.Instance.creeazaPacient(cnp, numePacient, sexPacient, dataNastere, adresa, ocupatie, locMunca);
                pacient = cauta.PacientGasit(cnp);
            }

            switch (tipDocument)
            {
            case "adeverinta medicala":

                //adeverinta

                var afectiune   = "pneumonie";
                var recomandare = "Se recomanda perioada de o saptamana repaus acasa";
                var serive      = "insanatosire";

                AdeverintaMedicala adeverinta = new AdeverintaMedicala(dateSpital, nrFisa, pacient, afectiune, recomandare, serive, dataEiberare);

                //adaugam pt istoric
                pacient.afectiuneRecomandare.Add(afectiune, recomandare);
                //adaugam in fisa istoric existenta pentru pacient

                if (pacient.istoricExistent == 0)
                {
                    pacient.istoricExistent = 1;
                }

                adeverinta.GenereazaAdeverintaMedicala(cnp);
                break;


            case "reteta":
                //hardcoded
                var nrReteta   = 1;
                var gratuit    = "DA";
                var diagnostic = "raceala";
                var reteta     = "Nurofen Raceala si Gripa - 3ori/zi" + "\n Trachisan 1/zi";

                Reteta retetaFisa = new Reteta(dateSpital, nrReteta, gratuit, pacient, diagnostic, reteta, dataEiberare);
                retetaFisa.GenereazaReteta(cnp);

                break;
            }
        }