Selaa lähdekoodia

new: support for schema, and prefix tables

Steve Nyemba 4 vuotta sitten
vanhempi
commit
a9dcf02236

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 138 - 138
healthcareio/docs/remits-835-relational-structure.xmi


+ 2 - 2
healthcareio/healthcare-io.py

@@ -387,9 +387,9 @@ if __name__ == '__main__' :
             #
             # Let's run the export function  ..., This will push files into a data-store of choice Redshift, PostgreSQL, MySQL ...
             #
-            _store = json.loads( (open(path) ).read())
+            _store = {"type":"sql.SQLWriter","args":json.loads( (open(path) ).read())}
             
-            pipes = export.Factory.instance(type=TYPE,write_store={"type":"sql.SQLWriter","args":{"provider":"postgresql","db":"sample",}}) #"inspect":0,"cast":0}})  
+            pipes = export.Factory.instance(type=TYPE,write_store=_store) #"inspect":0,"cast":0}})  
             # pipes[0].run()
             for thread in pipes:
                 thread.start()

+ 3 - 1
healthcareio/x12/__init__.py

@@ -173,12 +173,14 @@ class Formatters :
     def pos(self,value):
         """
             formatting place of service information within a segment (REF)
+            @TODO: In order to accomodate the other elements they need to be specified in the configuration
+                Otherwise it causes problems on export
         """
         
         xchar = '>' if '>' in value else ':'
         x = value.split(xchar)    
         x =  {"code":x[0],"indicator":x[1],"frequency":x[2]} if len(x) == 3 else {"code":x[0],"indicator":None,"frequency":None}
-        return x
+        return x['code']
 class Parser (Process):
     def __init__(self,path):
         """