Added "lab" in for medical [sti] tests.
This commit is contained in:
parent
5d111433c3
commit
81fc10966d
@ -1 +1 @@
|
|||||||
../../journal/
|
../../../Documents/journal/
|
||||||
|
@ -147,7 +147,7 @@ struct scan {
|
|||||||
} edits;
|
} edits;
|
||||||
struct linepair_tree dreams;
|
struct linepair_tree dreams;
|
||||||
struct linekvpair_tree contacts, books, tvs, movies, ideas,
|
struct linekvpair_tree contacts, books, tvs, movies, ideas,
|
||||||
vaccines, medications, mails, couches;
|
vaccines, medications, labs, mails, couches;
|
||||||
struct linekvdate_tree froms;
|
struct linekvdate_tree froms;
|
||||||
struct linekvmoney_tree taxes, incomes;
|
struct linekvmoney_tree taxes, incomes;
|
||||||
struct glider_tree gliders;
|
struct glider_tree gliders;
|
||||||
|
@ -256,6 +256,7 @@ static int scan_day(struct scan *const scan, union date32 date,
|
|||||||
<bracket> "idea: " :=> idea
|
<bracket> "idea: " :=> idea
|
||||||
<bracket> "vaccine: " :=> vaccine
|
<bracket> "vaccine: " :=> vaccine
|
||||||
<bracket> "medication: " :=> medication
|
<bracket> "medication: " :=> medication
|
||||||
|
<bracket> "lab: " :=> lab
|
||||||
<bracket> "tax: " :=> tax
|
<bracket> "tax: " :=> tax
|
||||||
<bracket> "in: " :=> income
|
<bracket> "in: " :=> income
|
||||||
<bracket> "mail: " :=> mail
|
<bracket> "mail: " :=> mail
|
||||||
@ -436,6 +437,22 @@ static int scan_day(struct scan *const scan, union date32 date,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<lab> * { fail = "lab unrecognized"; goto catch; }
|
||||||
|
<lab> @s0 bralabel @s1 "]" => input_text {
|
||||||
|
const union line64 key = { { (uint32_t)line, date } };
|
||||||
|
struct kvpair *pair;
|
||||||
|
switch(linekvpair_tree_bulk_assign(&scan->labs, key, &pair)) {
|
||||||
|
case TREE_PRESENT: fail = "duplicate"; case TREE_ERROR: goto catch;
|
||||||
|
case TREE_ABSENT: break;
|
||||||
|
}
|
||||||
|
pair->key.a = s0, pair->key.b = s1;
|
||||||
|
pair->value.a = pair->value.b = 0;
|
||||||
|
input.future = yycnewline, input.pair = &pair->value;
|
||||||
|
fprintf(stderr, "%s:%zu: new lab <<%.*s>>.\n",
|
||||||
|
datestr, line, (int)(s1 - s0), s0);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
<tax> * { fail = "tax unrecognized"; goto catch; }
|
<tax> * { fail = "tax unrecognized"; goto catch; }
|
||||||
<tax> @s0 bralabel @s1 "]" => input_money {
|
<tax> @s0 bralabel @s1 "]" => input_money {
|
||||||
const union line64 key = { { (uint32_t)line, date } };
|
const union line64 key = { { (uint32_t)line, date } };
|
||||||
@ -989,6 +1006,7 @@ void scan_(struct scan *const scan) {
|
|||||||
linekvmoney_tree_(&scan->taxes);
|
linekvmoney_tree_(&scan->taxes);
|
||||||
linekvdate_tree_(&scan->froms);
|
linekvdate_tree_(&scan->froms);
|
||||||
linekvpair_tree_(&scan->couches);
|
linekvpair_tree_(&scan->couches);
|
||||||
|
linekvpair_tree_(&scan->labs);
|
||||||
linekvpair_tree_(&scan->medications);
|
linekvpair_tree_(&scan->medications);
|
||||||
linekvpair_tree_(&scan->vaccines);
|
linekvpair_tree_(&scan->vaccines);
|
||||||
linekvpair_tree_(&scan->ideas);
|
linekvpair_tree_(&scan->ideas);
|
||||||
@ -1070,6 +1088,7 @@ struct scan scan(struct journal *const jrnl) {
|
|||||||
|| !linekvpair_tree_bulk_finish(&scan.ideas)
|
|| !linekvpair_tree_bulk_finish(&scan.ideas)
|
||||||
|| !linekvpair_tree_bulk_finish(&scan.vaccines)
|
|| !linekvpair_tree_bulk_finish(&scan.vaccines)
|
||||||
|| !linekvpair_tree_bulk_finish(&scan.medications)
|
|| !linekvpair_tree_bulk_finish(&scan.medications)
|
||||||
|
|| !linekvpair_tree_bulk_finish(&scan.labs)
|
||||||
|| !linekvpair_tree_bulk_finish(&scan.couches)
|
|| !linekvpair_tree_bulk_finish(&scan.couches)
|
||||||
|| !linekvdate_tree_bulk_finish(&scan.froms)
|
|| !linekvdate_tree_bulk_finish(&scan.froms)
|
||||||
|| !linekvmoney_tree_bulk_finish(&scan.taxes)
|
|| !linekvmoney_tree_bulk_finish(&scan.taxes)
|
||||||
|
Loading…
Reference in New Issue
Block a user