C:\Users\mzsmu\Desktop\MOC\2d\HRA_MEDICARE_MAILBACK_11112019.txt
C:\Users\mzsmu\Desktop\MOC\2d\REMINDER_MEDICARE_MAILBACK_11122019.txt
results = collection.Find(filter).Sort(sort).Skip(currentPage * pageSize).Limit(pageSize).ToList();
OPT_OUT_MEMBERS_11_06_2019.txt
E:\MOC\CAREPLAN_MEDICARE_MAILBACK_12102019.txt
E:\MOC\MEDICARE_POSTAGE_12102019.txt
E:\MOC\MEDICARE_POSTAGE_11142019.txt
E:\MOC\CAREPLAN_MEDICARE_MAILBACK_11292019.txt
E:\3a-ee.csv
E:\HRA_Medicare_English_20191112.csv
E:\HRA_Medicare_English_20191203.csv
ManualExportFilePath: "C:\Users\mzsmu\Desktop\MOC";
db.getCollection("CareplanMemberResponsesEnc").find( { "Responses.Key": "RACE" } ).count()
filter = filter & Builders<CareplanMemberResponse>.Filter.ElemMatch<Field>("Responses", new BsonDocument() { { "Key", questionCode } });
C:\Users\mzsmu\Downloads\CAREPLAN_MEDICARE_MAILBACK_11152019.CSV
E:\MOC\CAREPLAN_MEDICARE_MAILBACK_11152019.CSV
{
"_id" : ObjectId("5dce966b89de4b0a8cf88281"),
"CareplanId" : ObjectId("5a2919e38c01800c18031a96"),
"MEMBER_ID" : "22557265*01",
"SURVEY_TYPE" : "Medicare",
"SURVEY_SOURCE" : "Xyz",
"LOB" : "MAPA",
"FIRST_NAME" : "PAMELA",
"LAST_NAME" : "RODGERS",
"ADDRESS_LINE_1" : "",
"ADDRESS_LINE_2" : "",
"ADDRESS_CITY" : "",
"ADDRESS_STATE_CODE" : "",
"ADDRESS_ZIP_CODE" : "",
"DATE_OF_BIRTH" : "14JUN1962",
"SEX" : "F",
"PRIMARY_LANGUAGE" : "ENG",
"Maps" : [
{
"CareplanQuestionCode":"COMP_FORM",
"HRAQuestionCode":"Q1",
"Answers" : [
{
"CareplanAnswer":"",
"HRAAnswer":""
}
]
}
]
}
ReportingProperties = new List<Field>();
model.ReportingProperties.Add(
new Field
{
Key = QuestionHeaders[item],
Values = valueRow[rowValueExistsIn]
}
);
while (csv.Read())
{
for (int i = 0; csv.TryGetField<string>(i, out value); i++)
{
dataRow.Add(value);
}
}
string specificReport = "<table border='1' cellpadding='0' cellspacing='0' bordercolor='#dddddd' style='width:600px; font-family: Arial, Helvetica, sans-serif; margin:0;padding-top:0px;'>" +
"<tr style='width:600px;'>" +
"<td style='background-color: #f5f5f5; padding:10px; font-weight:bold; font-size:14px; vertical-align:top;'>Postage Amount</td>" +
"<td style='padding:10px; text-transform:lowercase; vertical-align:top; font-size:14px;'>" + client.PostageAmount + "</td>" +
"</tr>" +
"<tr style='width:600px;'>" +
"<td style='background-color: #f5f5f5; padding:10px; font-weight:bold; font-size:14px; vertical-align:top;'>Status</td>" +
"<td style='padding:10px; text-transform:lowercase; vertical-align:top; font-size:14px;'>" + "Postage Amount is below 1000$" + "</td>" +
"</tr>" +
"<tr style='width:600px;'>" +
"<td style='background-color: #f5f5f5; padding:10px; font-weight:bold; font-size:14px; vertical-align:top;'>Execution time</td>" +
"<td style='padding:10px; text-transform:lowercase; vertical-align:top; font-size:14px;'>" + String.Format("{0:f} EST", HelperUtility.GetCurrentTimeInEST()) + "</td>" +
"</tr>" +
"<tr>" +
"<td colspan='2'>" +
"<table style='width:600px;font-family: Arial, Helvetica, sans-serif; margin:auto' cellspacing='0' cellpadding='0' bordercolor='#dddddd' border='0'>" +
"<tr>" +
"<td style='background-color: #f5f5f5; padding:10px; font-weight:bold; font-size:14px; vertical-align:top;'>Message</td>" +
"</tr>" +
"<tr>" +
"<td style='padding:10px; font-size:14px;'>" +
result.Message.Replace(Environment.NewLine, "<br />") +
"</td>" +
"</tr></table></td>" +
"</tr>" +
"<tr>" +
"<td colspan='2'>" +
"<table style='width:600px;font-family: Arial, Helvetica, sans-serif; margin:auto' cellspacing='0' cellpadding='0' bordercolor='#dddddd' border='0'>" +
"<tr>" +
"<td style='background-color: #f5f5f5; padding:10px; font-weight:bold; font-size:14px; vertical-align:top;'>Processed/Valid/Corrupted</td>" +
"</tr>" +
"<tr>" +
"<td style='padding:10px; font-size:14px;'>" +
result.NoOfRecordsProcessed + "/" + result.NoOfValidData + "/" + result.NoOfCorruptedData +
"</td>" +
"</tr></table></td>" +
"</tr>" +
"</table><br/><br/>";
specificReport = "<table width='100 % ' align='center' cellpadding='0' cellspacing='0' style='border - collapse:collapse; background - color:#eeeeee; font-family:Arial, Helvetica, sans-serif;' >" +
"<tr>" +
"<td style = 'height: 20px' ></td>" +
"</tr>" +
"<tr>" +
"<td>" +
"<table width = '600' align = 'center' cellpadding = '0' cellspacing = '0' style = 'border-collapse:collapse; font-family:Arial, Helvetica, sans-serif;' >" +
"<tr>" +
"<td style = 'padding-top:30px; padding-bottom:30px; border-bottom: 1px solid #eee; background-color: #fff; padding-left: 25px;' >" +
"< img src = '<##IMAGEBASE##>image/logo.png' alt = 'Insightin | Health' title = 'Insightin | Health' />" +
"</td>" +
"</tr>" +
"<tr>" +
"<td style = 'padding-top:25px; padding-right:25px; padding-bottom:10px; padding-left:25px; background-color:#fff;' >" +
"<p style = 'font-size:16px; color:#757575; margin:0; padding-top: 10px;' >" +
"Welcome to Insightin | Health platform.Please follow the link below to complete your registration." +
"</p>" +
"<br/>" +
"</td>" +
"</tr>" +
"<tr>" +
"<td style = 'padding-right:25px; padding-left:25px; background-color:#fff; ' >" +
"<a style = 'display:inline-block; background-color: #8dc63f; color: #fff; padding: 10px 45px; text-decoration: none; font-weight: bold; float: left;' href = '<##ReqLink##>' target = '_blank' > Join Now </a>" +
"</td>" +
"</tr>" +
"<tr>" +
"<td style = 'padding-top:40px; padding-right:25px; padding-bottom:47px; padding-left:25px; background-color:#fff;' >" +
"<p style = 'font-size:16px; color:#757575; margin:0; '>" +
"Thank you! < br > Insightin Team" +
"</p>" +
"</td>" +
"</tr>" +
"<tr>" +
"<td style = 'padding: 10px 25px 10px 25px; font-size: 16px; color: #757575; background-color: #fff; border-top: 1px solid #eee;' >" +
"<p> *Please do not reply to this email address as this is an unmonitored email address.</ p >" +
"</td>" +
"</tr>" +
"</table>" +
"</td>" +
"</tr>" +
"<tr>" +
"<td style = 'height: 20px' ></td>" +
"</tr>" +
"</table>";
if (matchedQuestion != null)
{
response.Key = matchedQuestion.CareplanQuestionCode;
//mocHraResponse
careplanMemberResponse.MemberId = mocHraResponse.MemberId;
careplanMemberResponse.IsExported = mocHraResponse.IsProccessed;
careplanMemberResponse.FirstName = mocHraResponse.FIRST_NAME;
careplanMemberResponse.LastName = mocHraResponse.LAST_NAME;
careplanMemberResponse.SourceFile = mocHraResponse.Source;
careplanMemberResponse.CreatedOn = mocHraResponse.CreatedOn;
//careplanMemberResponse.CareplanDate = DateTime.Parse(mocHraResponse.ASSESSMEMT_DATE);
}
careplanMemberResponse.Responses.Add(response);
var memberEnrolled = (EnrolledMember)_enrolledMemberRepository.GetByMemberId(item.MEMBER_ID);
careplanMemberObject.Address1 = memberEnrolled.AddressLine1;
careplanMemberObject.Address2 = memberEnrolled.AddressLine2;
careplanMemberObject.City = memberEnrolled.AddressCity;
careplanMemberObject.CareplanId = memberEnrolled.ClientId;
careplanMemberObject.DateOfBirth = DateTime.Parse(memberEnrolled.DateOfBirth);
careplanMemberObject.FirstName = memberEnrolled.FirstName;
careplanMemberObject.LastName = memberEnrolled.LastName;
//careplanMemberObject.LOB = memberEnrolled.l
careplanMemberObject.MemberId = item.MEMBER_ID;
careplanMemberObject.PlanType =
//Answer Map
int index = field.Key.LastIndexOf('_');
string answer = string.Empty;
if (index != -1)
{
answer = field.Key.Substring(index + 1);
if ((field.Key.Equals(UniqueQuestionAnswers.Q15_23.ToString()))
|| (field.Key.Equals(UniqueQuestionAnswers.Q16_9.ToString()))
|| (field.Key.Equals(UniqueQuestionAnswers.Q17_6.ToString()))
|| (field.Key.Equals(UniqueQuestionAnswers.Q19_11.ToString()))
|| (field.Key.Equals(UniqueQuestionAnswers.Q39_11.ToString())))
{
if (field.Values.Equals("1"))
{
field.Values = "99";
}
}
if (field.Values.Equals("0"))
{
field.Values = "";
}
else if(field.Values.Equals("1"))
{
field.Values = answer;
}
//list.Add(field);
}
var quesMap = new QuestionMap();
var quesCode = quesMap.GetCareplanQuestionCode(field.Key);
field.Key = quesCode;
list.Add(field);
--------------->(end of answerMap method)
public enum UniqueQuestionAnswers
{
Q15_23,
Q16_9,
Q17_6,
Q19_11,
Q39_11
}
public class QuestionMap
{
Dictionary<string, string> quesCode = new Dictionary<string, string>();
public QuestionMap()
{
quesCode.Add("Q1", "COMP_FORM");
quesCode.Add("Q2", "DOB");
quesCode.Add("Q3", "GENDER");
quesCode.Add("Q4", "RACE");
quesCode.Add("Q5", "HISPANIC_LATIO");
quesCode.Add("Q6", "LANGUAGE");
quesCode.Add("Q7", "HEIGHT");
quesCode.Add("Q8", "WEIGHT");
quesCode.Add("Q9", "VISION_IMP");
}
public string GetCareplanQuestionCode(string hraQuestionCode)
{
string careplanQuestionCode = string.Empty;
string value;
int index = hraQuestionCode.LastIndexOf('_');
if (index != -1)
{
hraQuestionCode = hraQuestionCode.Substring(0, index);
}
if (quesCode.TryGetValue(hraQuestionCode, out value))
{
Console.WriteLine("Question Code Found");
careplanQuestionCode = quesCode[hraQuestionCode].ToString();
}
else
{
Console.WriteLine("Question Code Not found");
careplanQuestionCode = hraQuestionCode;
}
return careplanQuestionCode;
}
}
public async Task<IEnumerable<MemberHRA>> GetAllMembersForLastHRA(string clientId)
{
try
{
var filter = Builders<MemberHRA>.Filter.Where(x => x.ClientId == clientId);
filter = filter & Builders<MemberHRA>.Filter.Where(x => x.LastHRALetterSendOn.Value.AddDays(395) <= DateTime.UtcNow.AddDays(-395));
//filter = filter & Builders<MemberHRA>.Filter.Lte(x => x.LastHRALetterSendOn, DateTime.UtcNow.AddDays(-395));
return await Collection.Find(filter).ToListAsync().ConfigureAwait(false);
}
catch (Exception ex)
{
throw ex;
}
}
SDOH data RnD
Power BI report re-design
SDOH data RnD [ARD-218] (12/06/2019)
Power BI report re-design [ARD-278] (12/10/2019)