code View

id 77
Title Drugs delivery
Type Database 6.1
Highlight group
Description Drugs delivery are attributes of the domain = APPOINTMENT , event_type = APP_DRUGS
Code

--> in d_events

d_events table  for Drugs delivery 
 id_event 
 domain= 'APPOINTMENT'
 event_type= 'APP_DRUGS'
 id_person 
 date_aptappointment date
 date_apt_exedelivery date
 date_startappointment created date
 event_status= 'APE-002'
 category= DRUGS
 ev_vm1 
 usr_ins 
 usr_mod 
 usr_datamod 

--> in d_events_att

d_events_att  
id_events_att (primary key) 
id_event 
id_person 
  
domain= 'A_DRUGS'
date_eventdo not use
vt1deliverable
vt2drug
vt3 
vt4idfarmaco
vt5utente_ins
vt6utente_mod
vd2data_mod
vt7WarningReso
vt8 
vn1frequency
vn2days delivered
vn3days coverage
vn4days uncovered
vn5pills not returned
vn6morning
vn7midday
vn8percentage of adherence
vn9afternoon
vn10QUANTITY
vn11returned
vn12evening
vn13 
vd1delivery date
vb1additional
vb2when needed
vb3norecalc
vb4replacement

 

 

var j = from a in db.d_events_att.Where(w => w.domain == "A_DRUGS")        //Consegna farmaci
		from b in db.d_events_att.Where(w => w.domain == "A_DPRES" && a.vn13 == w.id_events_att).DefaultIfEmpty() //Diaria Posologia

 

Ordine 550