Editing
Mental health expansion
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====Base data for report month==== <syntaxhighlight lang="sql" line> -- get base data into temp table select ContractID, ContractName, ClientID, EpisodeContractID, NoteDate, ContactTypeID, ContactTypeActive, case -- find contact types that are 'direct contacts' when ContactTypeID in ( 2, ββββββ3, ββββββ4, ββββββ13, ββββββ15, ββββββ19, ββββββ20, ββββββ24, ββββββ27, ββββββ34, ββββββ35, ββββββ37, ββββββ38, ββββββ39, ββββββ41, ββββββ63, ββββββ68, ββββββ69, ββββββ72, ββββββ75, ββββββ76, ββββββ77, ββββββ83, ββββββ85, ββββββ86, ββββββ88, ββββββ89, ββββββ90, ββββββ93, ββββββ94, ββββββ97, ββββββ98) then 1 ββββββelse 0 ββββββend as 'Direct contact' into #mhbase from vClientNotesDocuments where ContractID = 11 -- MHE contract ID and datepart(mm,NoteDate) = 1 --> ## SET REPORT MONTH HERE and datepart(yy,NoteDate) = 2025 --> ## SET REPORT YEAR HERE and UserID <> 1111 -- exclude this user ; </syntaxhighlight>
Summary:
Please note that all contributions to Kautepedia are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Kautepedia:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
British English
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
British English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information