Question: I'm not sure how to resolve this error:

*Procedure or Function 'sp\_executesql' expects parameter '@statement', which was not supplied.*

for this query:

```
DECLARE @a INT 
DECLARE @b VARCHAR 
SET @a = 1

WHILE @a < 30
BEGIN
set @b = @a  
exec sp_executesql update source_temp set pmt_90_day = pmt_90_day + convert(money,'trans_total_'+@b)+N'
    N'where convert(datetime,'effective_date_'+@b)+N' <= dateadd(day,90,ORSA_CHARGE_OFF_DATE)
    and DRC_FLAG_'+@b = 'C'''

SET @a = @a + 1
END

```

Also, can you help me understand the proper usage of N' and if its done correctly in this statement.

Thanks for your assistance.

Answer: 
HL7 is what you need.

Some links:

<http://aurora.regenstrief.org/security/>

<http://www.hl7.org.au/docs/HL7-Sec.htm>
For your medical applications, are they specific to images? If so, you might refer to the DICOM 3.0 standard. 

Here are some chapters for references (what kind of encryption algorithms to be used, which part should be de-identified etc..)

* [Part 15 Security Profiles
<ftp://medical.nema.org/medical/dicom/2009/09_15pu.pdf>](ftp://medical.nema.org/medical/dicom/2009/09_15pu.pdf)
* [Supp 51 Media Security
<ftp://medical.nema.org/medical/dicom/final/sup51_ft.pdf>](ftp://medical.nema.org/medical/dicom/final/sup51_ft.pdf)
* [Supp 86 Digital Signatures for Structured Reports](ftp://medical.nema.org/medical/dicom/final/sup86_ft2.pdf)