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
WITH inserted AS ( | |
SELECT fhir_create_resource(:resource) AS resource -- should end up inserting into `encounter` table | |
), joined_foo AS ( | |
INSERT INTO foo(x) SELECT resource->'id' FROM inserted | |
RETURNING * | |
), joined_bar AS ( | |
INSERT INTO bar(x) SELECT resource->'id' FROM inserted | |
RETURNING * | |
) SELECT resource FROM inserted; |
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
(defprotocol Logging | |
(log [logger data])) | |
(def ^:dynamic *logger* | |
(reify Logging | |
(log [this data] | |
(clojure.pprint/pprint data)))) | |
(def request-data {::request-id 1 ::request-source "someone"}) |
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
mydate <- strptime('Mon Dec 09 2019 13:35:10 GMT-0700', | |
format='%a %b %d %Y %H:%M:%S GMT%z') |
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
;; Let's say we have a function `foo`, that we want to decorate with logging: | |
(defn foo [x] | |
(inc x)) | |
;; First, let's change the name to suggest an impl: | |
(defn foo* [x] | |
(inc x)) |
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
;; Hourly from yesterday morning up to current hour | |
http://www.eco-public.com/api/h7q239dd/data/periode/101017181/?begin=20150509&end=20150510&step=3 | |
;; Totals from yesterday and (so far?) today | |
http://www.eco-public.com/api/h7q239dd/data/periode/101017181/?begin=20150509&end=20150510&step=4 | |
;; Hourly for yesterday | |
http://www.eco-public.com/api/h7q239dd/data/periode/101017181/?begin=20150509&end=20150509&step=3 | |
;; Hourly for today |
OlderNewer