Ejemplo n.º 1
0
        /// <summary> Generates source code for all data types, segments, groups, and messages.</summary>
        /// <param name="baseDirectory">the directory where source should be written
        /// </param>
        public static void  makeAll(System.String baseDirectory, System.String version)
        {
            //load driver and set DB URL

            /*if (System.getProperty("ca.on.uhn.hl7.database.url") == null) {
             * System.setProperty("ca.on.uhn.hl7.database.url", "jdbc:odbc:hl7");
             * }*/

            try
            {
                System.Type.GetType("sun.jdbc.odbc.JdbcOdbcDriver");
                NuGenDataTypeGenerator.makeAll(baseDirectory, version);
                NuGenSegmentGenerator.makeAll(baseDirectory, version);
                NuGenMessageGenerator.makeAll(baseDirectory, version);
                // group and message not implemented
            }
            catch (System.Exception e)
            {
                SupportClass.WriteStackTrace(e, Console.Error);
            }
        }
Ejemplo n.º 2
0
 public static void  Main(System.String[] args)
 {
     /*GroupDef def = new GroupDef("ADT_FAKE", true, false);
      * def.addStructure(new SegmentDef("MSH", true, false));
      * def.addStructure(new SegmentDef("PID", false, false));
      * def.addStructure(new SegmentDef("PV1", false, true));
      * System.out.println(def.makeConstructor());
      * System.out.println(def.makeAccessor(0));
      * System.out.println(def.makeAccessor(1));
      * System.out.println(def.makeAccessor(2));
      */
     try
     {
         System.Type.GetType("sun.jdbc.odbc.JdbcOdbcDriver");
         NuGenMessageGenerator.makeAll("c:/java/adapter/source/", "2.4");
     }
     catch (System.Exception e)
     {
         SupportClass.WriteStackTrace(e, Console.Error);
     }
 }