public bool CreateCytologyRpt(CytologyReportsModel model) { using (EHMSEntities ent = new EHMSEntities()) { var cytoReprot = new CytologyReport() { CytopathNo = model.CytopathNo, PatientId = model.PatientId, RefDocId = model.RefDocId, RegId = model.RegId, DateOfDispatch = model.DateOfDispatch, DateOfReceipt = model.DateOfReceipt, WardOrOpd = model.WardOrOpd, ClinicalFeatures = model.ClinicalFeatures, Speciman = model.Speciman, Site = model.Site, ProcedureNote = model.ProcedureNote, MiicroDescription = model.MiicroDescription, Diagnosis = model.Diagnosis, Comments = model.Comments, Status = true, CreatedBy = HospitalManagementSystem.Utility.GetCurrentLoginUserId(), CreatedDate = DateTime.Today, Remarks = "Patho" }; ent.CytologyReports.Add(cytoReprot); ent.SaveChanges(); return(true); } }
public TaggedCytologyRptArray(string tag, CytologyReport mdo) { this.tag = tag; if (mdo == null) { this.count = 0; return; } this.rpts = new CytologyRpt[1]; this.rpts[0] = new CytologyRpt(mdo); this.count = 1; }
public CytologyRpt(CytologyReport mdo) { this.id = mdo.Id; this.title = mdo.Title; this.timestamp = mdo.Timestamp; if (mdo.Author != null) { this.author = new AuthorTO(mdo.Author); } if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } if (mdo.Specimen != null) { this.specimen = new LabSpecimenTO(mdo.Specimen); } this.clinicalHx = mdo.ClinicalHx; this.description = mdo.Description; this.exam = mdo.Exam; this.diagnosis = mdo.Diagnosis; this.comment = mdo.Comment; this.supplementalRpt = mdo.SupplementalReport; }
internal CytologyReport[] toCytologyReports(string response) { if (response == "") { return(null); } ArrayList lst = new ArrayList(); string[] lines = StringUtils.split(response, StringUtils.CRLF); lines = StringUtils.trimArray(lines); CytologyReport rpt = null; string collectionDate = ""; string specimenDesc = ""; string accessionNum = ""; for (int i = 0; i < lines.Length; i++) { string[] flds = StringUtils.split(lines[i], StringUtils.CARET); int fldnum = Convert.ToInt32(flds[0]); switch (fldnum) { case 1: if (rpt != null) { rpt.Specimen = new LabSpecimen("", specimenDesc.Substring(0, specimenDesc.Length - 1), collectionDate, ""); rpt.Specimen.AccessionNumber = accessionNum; lst.Add(rpt); } rpt = new CytologyReport(); rpt.Title = "Cytopathology Report"; specimenDesc = ""; if (flds.Length == 2) { string[] parts = StringUtils.split(flds[1], StringUtils.SEMICOLON); if (parts.Length == 2) { rpt.Facility = new SiteId(parts[0], parts[1]); } else if (flds[1] != "") { rpt.Facility = new SiteId(cxn.DataSource.SiteId.Id, flds[1]); } else { rpt.Facility = cxn.DataSource.SiteId; } } break; case 2: if (flds.Length == 2) { collectionDate = VistaTimestamp.toUtcFromRdv(flds[1]); } break; case 3: if (flds.Length == 2) { specimenDesc += flds[1] + '\n'; } break; case 4: if (flds.Length == 2) { accessionNum = flds[1]; } break; case 5: if (flds.Length == 2) { rpt.Exam += flds[1] + '\n'; } break; } } if (rpt != null) { rpt.Specimen = new LabSpecimen("", specimenDesc.Substring(0, specimenDesc.Length - 1), collectionDate, ""); rpt.Specimen.AccessionNumber = accessionNum; lst.Add(rpt); } return((CytologyReport[])lst.ToArray(typeof(CytologyReport))); }
internal CytologyReport[] toCytologyReports(string response) { if (response == "") { return null; } ArrayList lst = new ArrayList(); string[] lines = StringUtils.split(response, StringUtils.CRLF); lines = StringUtils.trimArray(lines); CytologyReport rpt = null; string collectionDate = ""; string specimenDesc = ""; string accessionNum = ""; for (int i = 0; i < lines.Length; i++) { string[] flds = StringUtils.split(lines[i], StringUtils.CARET); int fldnum = Convert.ToInt32(flds[0]); switch (fldnum) { case 1: if (rpt != null) { rpt.Specimen = new LabSpecimen("", specimenDesc.Substring(0, specimenDesc.Length - 1), collectionDate, ""); rpt.Specimen.AccessionNumber = accessionNum; lst.Add(rpt); } rpt = new CytologyReport(); rpt.Title = "Cytopathology Report"; specimenDesc = ""; if (flds.Length == 2) { string[] parts = StringUtils.split(flds[1], StringUtils.SEMICOLON); if (parts.Length == 2) { rpt.Facility = new SiteId(parts[0], parts[1]); } else if (flds[1] != "") { rpt.Facility = new SiteId(cxn.DataSource.SiteId.Id, flds[1]); } else { rpt.Facility = cxn.DataSource.SiteId; } } break; case 2: if (flds.Length == 2) { collectionDate = VistaTimestamp.toUtcFromRdv(flds[1]); } break; case 3: if (flds.Length == 2) { specimenDesc += flds[1] + '\n'; } break; case 4: if (flds.Length == 2) { accessionNum = flds[1]; } break; case 5: if (flds.Length == 2) { rpt.Exam += flds[1] + '\n'; } break; } } if (rpt != null) { rpt.Specimen = new LabSpecimen("", specimenDesc.Substring(0, specimenDesc.Length - 1), collectionDate, ""); rpt.Specimen.AccessionNumber = accessionNum; lst.Add(rpt); } return (CytologyReport[])lst.ToArray(typeof(CytologyReport)); }