1 - Create App DatabaseΒΆ
-
Create a database to serve as the Leaf application database. This can be as simple as:
CREATE DATABASE LeafDB
Tip
We also recommend also creating a Leaf-specific SQL service account and password for the API to use, though this isn't a requirement
-
Populate the database
tables
,stored procedures
, andfunctions
using the LeafDB.Schema.sql script. -
Populate the initialization data using the LeafDB.Init.sql script.
-
Grant your account permissions for the application database:
/* If using a service account - Optional but Recommended! */ CREATE LOGIN <your_account> WITH PASSWORD = '<your_pass>' USE LeafDB GO CREATE USER <your_account> FOR LOGIN <your_account> GRANT SELECT,UPDATE,INSERT,DELETE,EXEC ON SCHEMA :: app TO <your_account>; GRANT SELECT,UPDATE,INSERT,DELETE,EXEC ON SCHEMA :: network TO <your_account>; GRANT SELECT,UPDATE,INSERT,DELETE,EXEC ON SCHEMA :: adm TO <your_account>; GRANT SELECT,UPDATE,INSERT,DELETE,EXEC ON SCHEMA :: auth TO <your_account>; GRANT SELECT,UPDATE,INSERT,DELETE,EXEC ON SCHEMA :: ref TO <your_account>; GRANT SELECT,UPDATE,INSERT,DELETE,EXEC ON SCHEMA :: rela TO <your_account>; /* If on Windows */ GRANT ADMINISTER BULK OPERATIONS TO <your_account>; /* Else if on Linux */ ALTER SERVER ROLE [sysadmin] ADD MEMBER <your_account>;
-
Populate the CMS General Equivalence Mapping (GEMs) data using the LeafDB.GEMs.sql script. These allow the Concept search box to suggest ICD10 -> ICD9 or ICD9 -> ICD10 equivalents if users search for a specific ICD10/9 code.