/* * 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_LOINC_H_ #define PG_LOINC_H_ #include #pragma interface #include #include #include class Loinc : public Code, protected odbm { protected: // key char *loinc_num; // string section char *measure; // idx char *property; char *timing; char *specimen; char *precision; char *method; char *relat_nms; // must produce an index for each entry! char *mclass; // idx char *source; // idx char *euclide_cd; // idx char *astm_cd; // idx char *iupac_cd; // idx char *dt_last_ch; char *comments; char *answerlist; char *status; char *scope; char *snomed_cd; char *va_cd; char *metpath_code; // idx char *hcfa_code; char *norm_range; char *units; char *map_to; // scalar section int num_loinc; public: Loinc(); Loinc(const Loinc&); Loinc(const char*); ~Loinc(); operator const char *() const; operator int () const; Loinc& operator = (const Loinc&); Loinc& operator = (const char*); Loinc& operator = (int); bool lookup(const char *); bool lookup(int); bool exists(const char *) const; bool exists(int) const; bool exists() const; const char *getMeasure() const; const char *getProperty() const; const char *getTiming() const; const char *getSpecimen() const; const char *getPrecision() const; const char *getMethod() const; const char *getRelatNms() const; const char *getClass() const; const char *getEuclideCd() const; const char *getAstmCd() const; const char *getIupacCd() const; const char *getAnswerlist() const; const char *getStatus() const; const char *getScope() const; const char *getSnomedCd() const; const char *getVaCd() const; const char *getMetpathCode() const; const char *getHcfaCode() const; const char *getNormRange() const; const char *getUnits() const; void unset(); // set all values to NULL in order to do a: bool lookup(); // lookup with given values (i.e. complete the record) void setMeasure(const char *); void setProperty(const char *); void setTiming(const char *); void setSpecimen(const char *); void setPrecision(const char *); void setMethod(const char *); void setRelatNms(const char *); void setClass(const char *); void setEuclideCd(const char *); void setAstmCd(const char *); void setIupacCd(const char *); void setAnswerlist(const char *); void setStatus(const char *); void setScope(const char *); void setSnomedCd(const char *); void setVaCd(const char *); void setMetpathCode(const char *); void setHcfaCode(const char *); void setNormRange(const char *); void setUnits(const char *); private: static odbm_file odbmf; static u_int odbm_obj_cnt; static int chkdg(int); void set(const char *); protected: Loinc(int mode); // Loinc for write access to the odbm }; #ifndef OUTLINE #include "LOINC.icc" #endif #endif