comp.lang.ada
 help / color / mirror / Atom feed
* Annoying behavior
@ 2015-04-24 21:40 Laurent
  2015-04-25  4:31 ` gautier_niouzes
                   ` (2 more replies)
  0 siblings, 3 replies; 35+ messages in thread
From: Laurent @ 2015-04-24 21:40 UTC (permalink / raw)


Hi

Trying to build a program which generates this type of txt files:

<- <ENQ> 28/02/2015-07:58:28
-> <ACK>
<- <STX>
<- <RS>mtrsl|pi1900123456789|p2164|pp907088|p5907088|si|s040330|ssPLAIES|s5PLAIES|ci501
<- <RS>1234|c040330|ctAERO|ta|rtAST-N264|rr10335191|t12|o1esccol|ra|a1tem|a3<=4|a4
<- <RS>S|ra|a1am|a34|a4S|ra|a1amc|a34|a4S|ra|a1tzp|a3<=4|a4S|ra|a1rox|a34|a4S|ra|a1tax|
<- <RS>a3<=1|a4S|ra|a1taz|a3<=1|a4S|ra|a1fep|a3<=1|a4S|ra|a1etp|a3<=0,5|a4S|ra|a1mem|a3
<- <RS><=0,25|a4S|ra|a1an|a3<=2|a4S|ra|a1gm|a3<=1|a4S|ra|a1cip|a3<=0,25|a4S|ra|a1lev|a3
<- <RS><=0,12|a4S|ra|a1tgc|a3<=0,5|a4S|ra|a1fos|a3<=16|a4S|ra|a1ftn|a3<=16|a4S|ra|a1sxt
<- <RS>|a3<=20|a4S|zz|
<- <GS>9c
<- <ETX>
-> <ACK>
<- <EOT> 28/02/2015-07:58:29

For the moment I try to get the part done which generates the content in the middle of the file, the results behind the a1,13 and a4th. Which correspond to the antibiotic LIS code, the MIC and the sensibility.

The annoying behavior (for me, perhaps it is absolutely normal) I get is this while I try to read in the configuration file ( too many drug names to keep entering them manually):

laurent-lutgens-mac-pro-2:Build laurent$ ./generateur_trame_vt2
Begin of reading loop
read name: Amikacine      
read code: am 
read cmi: test    
read sir: S
Begin of reading loop

raised ANTIBIOTIQUES.NAME_TOO_SHORT : antibiotiques.adb:90

So the first antibiotic is read but then something blows up. Has to to with the SIR which is an enumeration. The others are strings. If I remove the SIR's from the config file then all items are read.
I am a bit lost because I don't understand what the reading procedure is getting to fail like this. Putting a Skip_Line behind doesn't help, makes things even worse.

Another strange behavior (for me, perhaps it is absolutely normal) is this one:

laurent-lutgens-mac-pro-2:Build laurent$ ./generateur_trame_vt2
Begin of reading loop
read name: Amikacine      
read code: amk
read cmi: testtest

Begin of reading loop
read name: Augkacine  <-- should be "Aug"
read code: pmk   <-- should be "p"             
read cmi: 123ttest <-- should be "123"

Displaying configuration

Amikacine      
amk
testtest

Augkacine      
pmk
123ttest

If I put spaces behind the name, code and cmi to fill up to the max length of the fields then it doesn't happen. I have a suspicion where this could come from but I am not sure and have no clue how to solve this.

https://github.com/Chutulu/Generateur-Trame-Vitek.git

Thanks

Laurent

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2015-05-13 12:07 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-24 21:40 Annoying behavior Laurent
2015-04-25  4:31 ` gautier_niouzes
2015-04-25  6:51   ` Laurent
2015-04-25  4:50 ` Niklas Holsti
2015-04-25  7:15   ` Laurent
2015-04-25  8:10     ` Niklas Holsti
2015-04-25 15:37       ` Laurent
2015-04-25 13:54 ` Stephen Leake
2015-04-25 15:46   ` Laurent
2015-04-25 17:02     ` Simon Wright
2015-04-25 17:41     ` Niklas Holsti
2015-04-25 18:58       ` Laurent
2015-04-25 19:30         ` Georg Bauhaus
2015-04-25 20:13           ` Laurent
2015-04-25 21:46             ` Laurent
2015-04-25 23:16           ` Bob Duff
2015-04-26 10:38     ` Jedi Tek'Unum
2015-04-26 11:52       ` Textedit and txt Laurent
2015-04-26 13:21         ` brbarkstrom
2015-05-06 21:23           ` Randy Brukardt
2015-05-07 21:12             ` Laurent
2015-05-07 21:48               ` Simon Wright
2015-05-07 22:24                 ` Laurent
2015-05-08  5:50                   ` Simon Wright
2015-05-08  7:35                     ` Laurent
2015-05-08 23:35               ` Randy Brukardt
2015-05-09 19:25                 ` Laurent
2015-05-09 21:36                   ` Anh Vo
2015-05-11 17:00                 ` Shark8
2015-05-11 17:49                   ` Dmitry A. Kazakov
2015-05-09 15:23               ` brbarkstrom
2015-05-12  1:10                 ` Randy Brukardt
2015-05-12 12:44                   ` brbarkstrom
2015-05-12 21:57                     ` Randy Brukardt
2015-05-13 12:07                       ` brbarkstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox