Created
September 4, 2014 15:39
-
-
Save swoogles/62ec862a6e09242a5e27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getMobileUser(id: Int) = Action.async { | |
val f = Future { | |
DBAsyncExec { | |
implicit Connection => | |
val user = MobileUser.findById(id) | |
val flatUser = user match { | |
case Some(simpleUser) => | |
simpleUser | |
} | |
Some(PatientViewInfo( | |
user, | |
Location.findById(flatUser.primaryLocationIdx | |
), | |
Provider.findById(flatUser.primaryProviderIdx), | |
Location.findByPatron(flatUser.userIdx) | |
) | |
) | |
} | |
}(Contexts.blockingContext) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment