Esempio n. 1
0
        public RecoveredPatientsModel UpdateRecoveredPatientProperties(RecoveredPatientsModel recoveredPatients, [Optional] int nationalDocument, [Optional] string nameofPatient, [Optional] string situationAfterMedicines,
                                                                       [Optional] string situationBeforeRecover, [Optional] IList <string> usedMedicines)
        {
            recoveredPatients.NationalDocumentId      = nationalDocument;
            recoveredPatients.NameofPatient           = nameofPatient;
            recoveredPatients.SituationAfterMedicines = situationAfterMedicines;
            recoveredPatients.SituationBeforeRecover  = situationBeforeRecover;
            recoveredPatients.UsedMedicines           = usedMedicines;

            return(recoveredPatients);
        }
Esempio n. 2
0
        public RecoveredPatientsModel UpdateRecoveredPatients(RecoveredPatientsModel patientsDAL)
        {
            Expression <Func <RecoveredPatientsModel, bool> > filter = x => x.NationalDocumentId.Equals(patientsDAL.NationalDocumentId);
            RecoveredPatientsModel recoveredPatientsModel            = recoveredPatientCollection.Find(filter).FirstOrDefault();

            if (recoveredPatientsModel != null)
            {
                recoveredPatientsModel = recoveredPatientsModel.UpdateRecoveredPatientProperties(recoveredPatientsModel, patientsDAL.NationalDocumentId);
                recoveredPatientCollection.ReplaceOne(filter, recoveredPatientsModel);
            }

            return(recoveredPatientsModel);
        }
Esempio n. 3
0
        public void DeleteRecoveredPatients(RecoveredPatientsModel patientsDAL)
        {
            Expression <Func <RecoveredPatientsModel, bool> > filter = x => x.NationalDocumentId.Equals(patientsDAL.NationalDocumentId);

            this.recoveredPatientCollection.DeleteOne(filter);
        }
Esempio n. 4
0
 public void InsertRecoveredPatients(RecoveredPatientsModel patientsDAL)
 {
     recoveredPatientCollection.InsertOne(patientsDAL);
 }