def set_identifier(self, puid, alternative):
        """Extends superclass for convenience

        Set patient identifiers

        Keyword arguments:
        puid -- the puid/mrn
        alternate -- alternate ids (SSN, etc)
        """

        idents = []
        if puid:
            idents.append(
                supermod.Identifier(use=supermod.IdentifierUse(value='usual'),
                                    label=supermod.string(value='PUID'),
                                    value=supermod.string(value=puid)))

        for alt in alternative:
            idents.append(
                supermod.Identifier(
                    use=supermod.IdentifierUse(value='official'),
                    label=supermod.string(value=alt.alternative_id_type),
                    value=supermod.string(value=alt.code)))

        if idents:
            super(health_Patient, self).set_identifier(idents)
    def __set_gnu_identifier(self):
        if self.related_person:
            puid = safe_attrgetter(self.related_person, self.map['identifier'])
            if puid:
                ident = supermod.Identifier(
                    use=supermod.IdentifierUse(value='usual'),
                    label=supermod.string(value='PUID'),
                    value=supermod.string(value=puid))

                self.add_identifier(value=ident)
Exemplo n.º 3
0
    def set_identifier(self, identifier):
        """Extends superclass for convenience

        Keyword arguments:
        identifier -- puid
        """

        if identifier:
            ident = supermod.Identifier(
                use=supermod.IdentifierUse(value='usual'),
                label=supermod.string(value='PUID'),
                value=supermod.string(value=identifier))
            super(health_Practitioner, self).add_identifier(ident)
    def set_identifier(self, identifier):
        """Extend superclass

        Set the institution's identifier

        Keyword arguments:
        identifier - institution code
        """

        if identifier is not None:
            ident = supermod.Identifier(
                        use=supermod.IdentifierUse(value='official'),
                        label=supermod.string(value='Institution code'),
                        value=supermod.string(value=str(identifier)))
            super(health_Organization, self).set_identifier([ident])