/* * 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. */ #ifndef PG_IDTYP_H_ #define PG_IDTYP_H_ #include #pragma interface #include #include #include /* * DATA TYPE * * ID() -- identifier */ /* BE CAREFUL USING IDtyp. USE A Code WHENEVER POSSIBLE! */ /* PLEASE NOTE: * * Normally, the ID type should be closely linked to a table, thus * allowing to assume only well defined values. This practice is * followed with the abstract class `Code'. However, since HL7 does * not even define all of it's own (`hl7 defined') tables it seems * unseful in cases where there is no table yet to allow the ID type * to assume any character code. * * In terms of the HL7 specification, there is a class of ID's used, * whose instances are merely strings of digits (if not integers) and is * thus similar to SI. However, this difference is not made explicit in * the HL7 document. It seems like ID is a rather amorph type: there is * even an ID named composite value (patient location)! */ class IDtyp : public Strbase { public: IDtyp(); IDtyp(const char*); IDtyp(int x); IDtyp(long x); IDtyp(double x); IDtyp(const IDtyp&); const IDtyp &operator = (const IDtyp&); const IDtyp &operator = (const char *x); private: char *strip(char *s); friend class Code; }; #ifndef OUTLINE # include "IDtyp.icc" #endif #endif /* !PG_IDTYP_H_ */