|
Segoe, and make it Teal. It compiles faster.
|
|
|
|
|
I had really expected Comic Sans there
|
|
|
|
|
I'm glad I didn't disappoint. But Wedgie is better.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Comic Sans, or better still Wedgie[^]
A collogue once faxed in his weekly status report in Wedgie. They didn't have a sense of humour.
They had even less the following week when I faxed them a photocopy of the floppy mine was on...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: A collogue once faxed A Cologne wearing colleague?
|
|
|
|
|
It was a few years ago, so I have forgotten what he smelled like...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
This message contaings multiple occurence of ZPS (custum segment)segment and i am not abel to read thes multiple ZPS segments Please suggest how to read multiple ZPs segment.
MSH|^~\&|1100|BD|MEDUSA|TEST9223|201410131226||ORU|5508|P|2.3
PID|1||28299485860||TEST^LABCORP||19550515|F||||||||||66600009^^^03^^F
NTE|1|L|This is a comment at the patient level.
ORC|RE|28299485860^LAB|28299485860^LAB||||||201410090000
OBR|1|28299485860^LAB|28299485860^LAB|005009^CBC With Differential/Platelet^L|||201410090000|||||||201410091645||||||28299485860||201410091651|||F
OBX|1|NM|005025^WBC^L^6690-2^Leukocytes^LN||85.1|x10E3/uL|3.4-10.8|>||N|F|20130909||201410091647|01
OBX|2|NM|005033^RBC^L^789-8^Erythrocytes^LN||7.45|x10E6/uL|3.77-5.28|HH||N|F|20081208||201410091647|01
NTE|1|L|(An elevated percentage of Immature Granulocytes has not been found
NTE|2|L|to be clinically significant as a sole clinical predictor of disease.
NTE|3|L|Does NOT include bands or blast cells. Pregnancy associated
NTE|4|L|physiological leukocytosis may also show increased immature
NTE|5|L|granulocytes without clinical significance.)
OBX|22|NM|015945^NRBC^L^58413-6^Erythrocytes.nucleated/100 leukocytes^LN||10|%|0 - 0|H||N|F|20100201||201410091647|01
ORC|RE|28299485860^LAB|28299485860^LAB||||||201410090000
OBR|2|28299485860^LAB|28299485860^LAB|006072^RPR^L|||201410090000|||||||201410091645||||||28299485860||201410091651||02|F
OBX|1|ST|006072^RPR^L^20507-0^Reagin Ab^LN||Reactive||Non Reactive|A||N|F|||201410091647|02
ORC|RE|28299485860^LAB|28299485860^LAB||||||201410090000
OBR|3|28299485860^LAB|28299485860^LAB|006468^RPR Titer^L|||201410090000||||G|||201410091645||||||28299485860||201410091651|||F|006072|||006072
OBX|1|TX|006468^RPR Titer^L^31147-2^Reagin Ab^LN||1:1||NonRea<1:1|H||N|F|||201410091647|02
ZPS|1|01|LabCorp Burlington|1447 York Court^^Burlington^NC^272153361|3365845171||VP^Doe^Jane^^^^VP
ZPS|2|02|LabCorp Heart|7001 Forest Avenue Ste 202^^Richmond^VA^232301726|8042851513||MLT^Poe^Shaunta^D^^^MLT
ZPS|3|03|LabCorp Heart2|7003 Forest Avenue Ste 202^^Richmond^VA^232301726|8042851513||MLT^Poie^Shau^D^^^MLT
|
|
|
|
|
How does this message come in? Is it one long string containing all those lines? If so, read the list in one row at a time, split the string based on the | and check the value of the first element of the returned string array.
|
|
|
|
|
Since you are posting on a C# forum, I assume you want to read/parse a HAPI file using C#: there's a C# open-source (free) tookit here [^]:
"NHapi is a port of the original project HAPI.
NHapi allows Microsoft .NET developers to easily use an HL7 2.x object model. This object model allows for parsing and encoding HL7 2.x data to/from Pipe Delimited or XML formats. A very handy program for use in the health care industry.
This project is NOT affiliated with the HL7 organization. This software just conforms to the HL7 2.x specifications.
« I am putting myself to the fullest possible use which is all, I think, that any conscious entity can ever hope to do » HAL (Heuristically programmed ALgorithmic computer) in "2001, A Space Odyssey"
|
|
|
|
|
Disclaimer: I haven't worked with NHapi yet.
Since it is a custom segment, you must define it somewhere. Can you cope with a single occurrence of that segement? If not, try to achieve this first.
Next, there needs to be some kind of flag indicating that a segment can occur multiple times - look e.g. at the NTE segments.
|
|
|
|
|
currently i am working on a project which is related to WordWrapping in RichTextBox using C#. here i am using "." instead of using "spacebar" (for some other Regional language purpose) and i want to wrap the words after every"." and every lines shall end with "." but here the problem is "." is appearing at starting of every lines. so how can i avoid that the problem ?
therefore your kind threads are more than every thing. Thank you
|
|
|
|
|
I interpret your question to mean:
0. in a WinForm Project with a RichTextBox Control at run-time when the end-user:
a. types a period at the end of a group of non-white-space characters: a newline is inserted after the period
b. enters a return/enter character: if the last non-space character before the return/enter was not a period, then a period should be added before the return/enter.
It's quite possible that's an incorrect interpretation; if it's incorrect, then post an accurate description here of exactly how you want the RichTextBox to behave when the user types a period, or enters a return/enter character.
« I am putting myself to the fullest possible use which is all, I think, that any conscious entity can ever hope to do » HAL (Heuristically programmed ALgorithmic computer) in "2001, A Space Odyssey"
|
|
|
|
|
Thanks for your great interpretation. Yeah thats what i want to do
like before starting of the new line the previous line should end with non-space char pluse "." and "." shouldn't come beginning of the new line
Thanks BillWoodruff and your kinds suggestions are most appreciated.
modified 29-Oct-14 0:40am.
|
|
|
|
|
So, have you started trying to code the behavior you want ? Have any questions ?
One difficulty you may need to address is the fact that the RichTextBox performs no notification when a word-wrap is performed: it inserts no special character in the string. That means if you need to dynamically detect word-wrap you are going to have to use Win API calls. For an example, see: [^].
Here's a quick sketch ... just to show an idea ... in code of the kind of processing I expect you will be doing as the user types in the RichTextBox:
private int whiteSpaceSeenSoFar = 0;
private void handleEnterReturn()
{
}
private void YourRichTextBox_KeyUp(object sender, KeyEventArgs e)
{
switch (e.KeyCode)
{
case Keys.OemPeriod:
break;
case Keys.Enter:
handleEnterReturn();
break;
case Keys.Tab:
break;
case Keys.Space:
whiteSpaceSeenSoFar++;
break;
case Keys.Back:
break;
case Keys.Delete:
break;
default:
break;
}
}
« I am putting myself to the fullest possible use which is all, I think, that any conscious entity can ever hope to do » HAL (Heuristically programmed ALgorithmic computer) in "2001, A Space Odyssey"
modified 29-Oct-14 5:50am.
|
|
|
|
|
Hi,
It's hard to understand your problem. It would be easier if you post an example of what is wrong, and what you need.
If you're wrapping the words after "." you can solve the problem by adding a control to not wrap if there is a "\n" in the word.
|
|
|
|
|
Thanks @Member 10515897 for your response.
suppose i have string like
This.is.my.best.site.ever. // here i used "." instead of using "space"
but the problem is every starting line or new line "." is appearing first means like:
.This.is.my.best.site.ever // once i wrap the strings "." is appearing at the beginning of the new line. i shall avoid that
Therefore your kind suggestions are most appreciated. Thanks
|
|
|
|
|
Hello to everybody!
Excuse me for my question, but i really met with difficult situation.
I use pdfsharp library for making pdf reports, i read http://www.pdfsharp.net/ here samples and all as good, while i had to make a simple chart. For example this one:
public static Chart CombinationChart()
{
Chart chart = new Chart();
Series series = chart.SeriesCollection.AddSeries();
series.ChartType = ChartType.Column2D;
series.Add(new double[] { 1, 17, 45, 5, 3, 20, 11, 23, 8, 19 });
series.HasDataLabel = true;
series = chart.SeriesCollection.AddSeries();
series.ChartType = ChartType.Line;
series.Add(new double[] { 41, 7, 5, 45, 13, 10, 21, 13, 18, 9 });
XSeries xseries = chart.XValues.AddXSeries();
xseries.Add("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N");
chart.XAxis.MajorTickMark = TickMarkType.Outside;
chart.XAxis.Title.Caption = "X-Axis";
chart.YAxis.MajorTickMark = TickMarkType.Outside;
chart.YAxis.HasMajorGridlines = true;
chart.PlotArea.LineFormat.Color = XColors.DarkGray;
chart.PlotArea.LineFormat.Width = 1;
chart.PlotArea.LineFormat.Visible = true;
chart.Legend.Docking = DockingType.Left;
chart.Legend.LineFormat.Visible = true;
return chart;
}
This function returns the chart, but i can't place it to my pdf any way(((
My way creating pdf:
PdfDocument document = new PdfDocument();
document.Info.Title = "Created with PDFsharp";
PdfPage page = document.AddPage();
XGraphics gfx = XGraphics.FromPdfPage(page);
XFont font = new XFont("Verdana", 20, XFontStyle.BoldItalic);
gfx.DrawString("Hello, World!", font, XBrushes.Black,
new XRect(0, 0, page.Width, page.Height),
XStringFormats.Center);
const string filename = "HelloWorld.pdf";
document.Save(filename);
Process.Start(filename);
So the chart is to be in HelloWorld.pdf, but how to send it there, is it possible? Or it is possible only if i download library Migradoc?
Thank you, I'd appreciate any information you could give me
|
|
|
|
|
The Chart type is a MigraDoc object, so you'll need to use MigraDoc to add it to your PDF.
Have a look at the DefineCharts method in the "Hello MigraDoc" sample[^].
Edit: The Chart type is in the additional PdfSharp.Charting assembly, which I missed.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
modified 28-Oct-14 8:17am.
|
|
|
|
|
Thank you for answering, you confirmed my assumption about MigraDoc library, so i will try to use it, and check how it works, think i will have to setup MigraDoc instead of pdfsharp...so after i will write what i would get in result...
But the method
CombinationChart as i cited in my previous message, for what it?
I suppose it is based only on
PdfSharp.Charting library...so and there are no ways to get result of method
CombinationChart in pdf document... it is very sad if it is so...
|
|
|
|
|
Sorry, looks like my answer was wrong.
The sample you pasted is using the separate PdfSharp.Charting assembly, which is why I couldn't see the Chart type in the PdfSharp assembly. It looks like it comes from this example[^], which demonstrates how to add the chart to a PDF file using a ChartFrame :
PdfPage page = document.AddPage();
page.Size = PageSize.A4;
Chart chart = CombinationChart();
ChartFrame = new ChartFrame();
chartFrame.Location = new XPoint(30, 30);
chartFrame.Size = new XSize(500, 600);
chartFrame.Add(chart);
XGraphics gfx = XGraphics.FromPdfPage(page);
chartFrame.Draw(gfx);
document.Close();
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
|
Create a bitmap from the chart. If you're using WPF, you can create a bitmap (RenderTargetBitmap) from the chart's visual.
Use PdfSharp to convert the bmp to an XImage and draw it on the page using .DrawImage.
|
|
|
|
|
Yes, for me it is difficult too) I will try to make so, will search sample in internet, i am not similar with this method too...
thank you...
|
|
|
|
|
Yes; Google is your friend.
Once you have a bmp from your chart, it's easy.
Give it a try (making a bmp) and if you get stuck, come back here (with what you've tried).
|
|
|
|
|
I am trying to write a small search functionality in LINQ-to-SQL (with Sharp Repository and Entity Framework) where given a string value, I should be able to search it through all properties and return the entities which have the input string value "Contained" (as in someString.Contains ) in any of their properties (with "searchable" types like int, long, etc since search by ID should be possible).
I have written a method which does this for a "single" string property (which was the requirement earlier ) and returns an Expression predicate which I pass to my SharpRepository instance as the selector.
public static Expression<Func<T, bool>> ContainsExpression<T>(string propertyName, string propertyValue)
{
var parameterExpression = Expression.Parameter(typeof(T), typeof(T).Name);
var propertyExpression = Expression.PropertyOrField(parameterExpression, propertyName);
var stringTypeArray = new[] { typeof(String) };
var containsMethod = typeof(String).GetMethod("Contains", stringTypeArray);
var valueToBeChecked = Expression.Constant(propertyValue, typeof(String));
var finalContainsExpression = Expression.Call(propertyExpression, containsMethod, valueToBeChecked);
return Expression.Lambda<Func<T, bool>>(finalContainsExpression, parameterExpression);
}
I have even tried overriding ToString() method in my entity (simple Employee type at the moment) as:
public override string ToString()
{
string instance = String.Concat(Id, ",", Name, ",", Department, ",", DateOfJoining.ToString("dd-MMM-yyyy"), ",", Salary);
return instance;
} and then generate an Expression as:
Employee => Employee.ToString().Contains(ValueToBeSearched)
But needless to say, the first one won't work for the types other than String (since I will need to do someTypeOtherThanString.ToString().Contains(..) which is not supported in LINQ-to-SQL and the later one also won't work due to the similar reason!
I do know that I can simply write an SP for this functionality, I want to know if there's a way to achieve this using LINQ-to-SQL. Also, I need to pass the Expression as the selector to my SharpRepository instance so although I am not sure if a .ToList<T>() on all entities followed by a filter expression will work, unfortunately I am not open to that, I would rather write an SP.
[EDIT]
Just came across SqlFunctions[^].StringConvert() method overloads. Unfortunately they only support numeric types. But I think I have the necessary things to go ahead with string and numeric types. Will see what could be done for rest of the types, if they exist at all and should be search-enabled.
[/EDIT]
Any pointers will be appreciated. Thanks!
Your time will come, if you let it be right.
modified 28-Oct-14 1:58am.
|
|
|
|
|