/*********************************************************************** * * Standard HL7 to CareVue mapping */ /* * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include #include #include #include #include #include #include #include void fix_pid(class PIDseg &pid, class PV1seg &pv1); ZDMseg assemble_zdm(class PIDseg &pid, class PV1seg &pv1); ZDMseg assemble_zdm(class PIDseg &pid, class PV1seg &pv1, repstruc &rnk1, repstruc &al1, class DG1seg &dg1, repstruc &robx); const char* dt2cvdate(class DTtyp& dt); const char* sex2cv(SexCode::Value sex); DisDisCode::Value dis2hp(DisDisCode::Value dis); ResStatusCode::Value obrrsc2hp(ResStatusCode::Value); ObsResStatusCodesIntCode::Value obxrsc2hp(ObsResStatusCodesIntCode::Value); AbnFlagsCode::Value abf2hp(AbnFlagsCode::Value); int runcmd(const char *cmd); bool adtobx(ostream &os, const class OBXseg &obx); // the idb_direct shell script returns a byte with a bit pattern // defined as follows: #define IDB_FRST 0007 #define IDB_BED1 0001 // first bed 0 = free, 1 = occupied #define IDB_PAT1 0002 // first pat (by recno) 0 = unknown, 1 = known #define IDB_PIB1 0004 // first patient in first bed ( = 1 ) #define IDB_SCND 0070 #define IDB_BED2 0010 // second bed 0 = free, 1 = occupied #define IDB_PAT2 0020 // second pat (by recno) 0 = unknown, 1 = known #define IDB_PIB2 0040 // second patient in second bed ( = 1 ) #define IDB_ERR 0100 // error condition