Discoid lupus erythematosus (DLE) is a benign disorder of skin which clinically appears as asymptomatic sharply demarcated, erythematous macules, papules or small plaques frequently involving the face. These lesions rapidly develop a hyperkeratotic surface with an adherent scale extending into the follicular orifices that tend to heal with atrophy, scarring and pigmentary changes. The disease affects females commonly. It is subdivided into a localized and a disseminated form.  DLE can lead to rare complication like squamous cell carcinoma.
We present a case of 38-year-old female patient who presented with a persistent hyperpigmented, erythematous, thickened scaly plaque over the nose for the past six years. The lesion aggravated upon exposure to sun. She also had history of recurrent swelling and redness of fingers during the winter season. Examination revealed a solitary hyperpigmented and erythematous plaque of 3×2 cm with overlying adherent scales [Figure 1]. She did not have any associated complaint and there were no similar lesion anywhere else on the body. Her routine biochemical investigations were within normal range. Anti nuclear antibody and Rheumatoid Arthritis factor was negative. Venereal disease research laboratory was also non-reactive. Skiagram of chest was found to be normal. Eye examination did not reveal any abnormality. A skin biopsy done from the lesion over the nose showed atrophy of the epidermis, keratotic plugging, vacuolar degeneration of the basal layer, and dense lymphomononuclear cells infiltrate in the superficial dermis [Figure 2]a and b. Biopsy results were consistent with pathological findings of DLE. She was advised to avoid sun exposure and to reduce stress and fatigue. She was given Hydroxychloroquine tablets 200 mg twice a day. Topical steroids were given for the lesion over the nose. She was given oral calcium channel blocker (nifedipene) for chilblains. Keeping in view the socioeconomic status of the patient and high cost of the drug, thalidomide could not be prescribed. In due course of time and on regular follow-up, we noticed similar new lesions in the triangular fossa and helix of her bilateral ears. She was continued with the same treatment and was advised to be on regular follow-up. As is found in this country the patient got lost to follow-up but arrived one day after 3 years complaining that the lower portion of her left ear was gradually getting eroded and mutilated. On examination, the lobule and adjacent lower portion of helix of her left ear were found to be mutilated and were studded with erythematous scaly lesions on the margins. Similar changes were also observed on the right ear. Her repeat biopsy from the margin of mutilated lobule, showed changes similar to what were seen on the DLE lesion, but the infiltrate extended to the subcutaneous fat favoring the diagnosis of lupus panniculitis. Prognosis was explained to the patient and her relatives. An opinion of plastic surgeon was also taken for the possibility of reconstructive surgery. The term "lupus" means "wolf" in Latin, and is attributed to Physician Rogerius Frugardi (1230 AD). It was probably thought that the damage caused by the disease resembled the result of an attack by a ravenous wolf.  Atrophy, liquefaction degeneration, oedema, hyalinization of connective tissue, marked lymph mononuclear cell infiltration are characteristically found in histology of DLE, such infiltration may have involved the skin with its appendages, subcutaneous tissue and vessels in the dermis and underlying cartilages of ears. , Same mechanism of dermal and subcutaneous necrobiosis with some element of vasculitis might have played leading to mutilation and deformity in our case. In 70% of patients with lupus panniculitis there will be either preceding, subsequent, or concomitant lesions of DLE. It is a chronic condition that often involves persistent lesions that subsequently heal with disfigurement.  Extensive literature search failed to reveal this type of mutilation involving ear lobule. The aim of reporting this case is to make dermatologists aware of this cosmetic and physical disfigurement so that timely prevention and treatment can be undertaken accordingly. This case is being reported for its rare presentation showing mutilating changes in the lesion of DLE. To conclude, rare complications like Squamous cell carcinoma and mutilative changes should always be kept in mind.
1. Holden CA, Berth-Jones J. Eczema, lichenification, prurigo and erythroderma. In: Burns T, Breathnach NC, Griffiths C, editors. Rook's Textbook of Dermatology. 7 th ed. USA (MC): Blackwell Science; 2004. p. 56.5-9.
2. Mallavarapu RK, Grimsley EW. The history of lupus erythematosus. South Med J 2007;100:896-8.
3. Harper JG, Pilcher MF, Szlam S, Lind DS. Squamous cell carcinoma in an African American with Discoid lupus erythematosus: A case report and review of the literature. South Med J 2010;103:256-9.
4. Sadhu SK, Senugupta SR. Squamous cell carcinoma in discoid lupus erythematosus with mutilating changes. Indian J Dermatol 1992;37:12-3.
5. Strober BE. Lupus Panniculitis (lupus profundus). Dermatol Online J 2001;7:20.


text:
Q: Get count of latest consecutive daily logins I have a SQL table containing a list of the daily logins of the subscribers to my site. The rows contain the user id and the date and time of the first login of each day, which means there is a maximum of one record per day for each member.
Is there a way to use SQL to get a count of the number if consecutive daily logins for each member, that is the latest login streak?
I could do this programmatically (C#) by going through each record for a user in reverse order and stop counting when a day is missing, but I was looking for a more elegant way to do this through a SQL function. Is this at all possible?
Thanks!

A: Answer from comment
You can use Lag function https://msdn.microsoft.com/en-IN/library/hh231256.aspx
If your database compatibility level is lower than 110 you cant use Lag function
The following code must get the latest streak of logins for you (only when there is record for 1st login of the day)
suppose if your table of dates for a single user is
pk_id       dates
----------- -----------
27          2017-04-02
28          2017-04-03
29          2017-04-04
30          2017-04-05
31          2017-04-06
44          2017-04-09
45          2017-04-10
46          2017-04-11
47          2017-04-12
48          2017-04-13

then
SELECT ROW_NUMBER() OVER(ORDER BY dates desc) AS Row#,dates into #temp1 FROM
yourTable where userid = @userid

select top 1 a.Row# As LatestStreak from #temp1 a inner join #temp1 b on a.Row# = b.Row#-1
where a.dates <> DATEADD(DAY,1,b.dates) order by a.Row# asc

this gives you 5, I have used Inner Join so that it wont have server compatibility issue
or you can use this, you can get the dates in the last streak too if you use c.dates instead of count(*)
SELECT COUNT(*)
FROM
(SELECT MAX (a.dates) AS Latest
 FROM #yourtable a
WHERE DATEADD(DAY,-1,dates)
    NOT IN (SELECT dates FROM #yourtable)) AS B
JOIN #yourtable c
ON c.dates >= b.Latest

A: This solution is probably similar to what you want:
How do I group on continuous ranges
It has a link to the motivating explanation here:
Things SQL needs: SERIES()
The main idea is that if after you have grouped by individual id's, and ordered by dates, the difference between date and current row is an invariant within each series of consecutive dates.  So you group by user and this invariant (and min date within this group).  And then you can group by user and pick the count of the 2nd column and only pick the max count.

redpajama_set_name: RedPajamaStackExchange